From 651814bea085df7cb5c89ebfee4d17cdbc9c79ef Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sat, 19 Aug 2017 11:18:49 +0200 Subject: [PATCH] Add method --- .../osmand/binary/BinaryMapDataObject.java | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/binary/BinaryMapDataObject.java b/OsmAnd-java/src/net/osmand/binary/BinaryMapDataObject.java index ef6c9a30c1..2455481ab2 100644 --- a/OsmAnd-java/src/net/osmand/binary/BinaryMapDataObject.java +++ b/OsmAnd-java/src/net/osmand/binary/BinaryMapDataObject.java @@ -1,11 +1,12 @@ package net.osmand.binary; -import java.util.LinkedHashMap; -import java.util.Map; - - import gnu.trove.list.array.TIntArrayList; import gnu.trove.map.hash.TIntObjectHashMap; + +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; + import net.osmand.binary.BinaryMapIndexReader.MapIndex; import net.osmand.render.RenderingRulesStorage; @@ -184,5 +185,17 @@ public class BinaryMapDataObject { return coordinates[2 * ind]; } - + public boolean compareBinary(BinaryMapDataObject thatObj) { + if (this.objectType == thatObj.objectType + && Arrays.equals(this.types, thatObj.types) + && this.area == thatObj.area + && Arrays.equals(this.additionalTypes, thatObj.additionalTypes) + && Arrays.equals(this.polygonInnerCoordinates, thatObj.polygonInnerCoordinates) + && Arrays.equals(this.coordinates, thatObj.coordinates) + && this.id == thatObj.id + && Arrays.equals(this.objectNames.values(), thatObj.objectNames.values())) { + return true; + } + return false; + } }