Package org.openstreetmap.josm.data.osm
Class OsmPrimitiveComparator
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.OsmPrimitiveComparator
-
public final class OsmPrimitiveComparator extends java.lang.Object
Comparators for comparingOsmPrimitive
.- Since:
- 4113
-
-
Constructor Summary
Constructors Modifier Constructor Description private
OsmPrimitiveComparator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Comparator<OsmPrimitive>
comparingNames()
Returns a comparator comparing primitives by their name usingDefaultNameFormatter
.static java.util.Comparator<OsmPrimitive>
comparingUniqueId()
Returns a comparator comparing primitives by their unique id.static java.util.Comparator<OsmPrimitive>
orderingNodesWaysRelations()
Returns a comparator ordering the primitives by type in the order NODE, WAY, RELATIONstatic java.util.Comparator<OsmPrimitive>
orderingRelationsWaysNodes()
Returns a comparator ordering the primitives by type in the order RELATION, WAY, NODEstatic java.util.Comparator<OsmPrimitive>
orderingWaysRelationsNodes()
Returns a comparator ordering the primitives by type in the order WAY, RELATION, NODE
-
-
-
Constructor Detail
-
OsmPrimitiveComparator
private OsmPrimitiveComparator()
-
-
Method Detail
-
comparingNames
public static java.util.Comparator<OsmPrimitive> comparingNames()
Returns a comparator comparing primitives by their name usingDefaultNameFormatter
. Formatted names are cached.- Returns:
- a comparator comparing primitives by their name using
DefaultNameFormatter
-
comparingUniqueId
public static java.util.Comparator<OsmPrimitive> comparingUniqueId()
Returns a comparator comparing primitives by their unique id.- Returns:
- a comparator comparing primitives by their unique id.
-
orderingNodesWaysRelations
public static java.util.Comparator<OsmPrimitive> orderingNodesWaysRelations()
Returns a comparator ordering the primitives by type in the order NODE, WAY, RELATION- Returns:
- a comparator ordering the primitives by type in the order NODE, WAY, RELATION
-
orderingWaysRelationsNodes
public static java.util.Comparator<OsmPrimitive> orderingWaysRelationsNodes()
Returns a comparator ordering the primitives by type in the order WAY, RELATION, NODE- Returns:
- a comparator ordering the primitives by type in the order WAY, RELATION, NODE
-
orderingRelationsWaysNodes
public static java.util.Comparator<OsmPrimitive> orderingRelationsWaysNodes()
Returns a comparator ordering the primitives by type in the order RELATION, WAY, NODE- Returns:
- a comparator ordering the primitives by type in the order RELATION, WAY, NODE
- Since:
- 11679
-
-