From 3802c811c789ee744f024b4cba17447d77fb808b Mon Sep 17 00:00:00 2001 From: Roman Inflianskas Date: Tue, 17 May 2016 17:35:21 +0300 Subject: [PATCH] MapObject: add comparator --- OsmAnd-java/src/net/osmand/data/MapObject.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/OsmAnd-java/src/net/osmand/data/MapObject.java b/OsmAnd-java/src/net/osmand/data/MapObject.java index 172e4b719c..28e0ef16d0 100644 --- a/OsmAnd-java/src/net/osmand/data/MapObject.java +++ b/OsmAnd-java/src/net/osmand/data/MapObject.java @@ -23,6 +23,7 @@ public abstract class MapObject implements Comparable { protected LatLon location = null; protected int fileOffset = 0; protected Long id = null; + public static final Comparator comparator = new MapObjectComparator(); public void setId(Long id) { this.id = id; @@ -207,7 +208,12 @@ public abstract class MapObject implements Comparable { public static class MapObjectComparator implements Comparator { private final String l; Collator collator = OsmAndCollator.primaryCollator(); - public MapObjectComparator(String lang){ + + public MapObjectComparator() { + this.l = null; + } + + public MapObjectComparator(String lang) { this.l = lang; }