Class BoundablePairDistanceComparator
java.lang.Object
org.locationtech.jts.index.strtree.BoundablePairDistanceComparator
- All Implemented Interfaces:
Serializable
,Comparator<org.locationtech.jts.index.strtree.BoundablePair>
public class BoundablePairDistanceComparator
extends Object
implements Comparator<org.locationtech.jts.index.strtree.BoundablePair>, Serializable
The Class BoundablePairDistanceComparator. It implements Java comparator and is used
as a parameter to sort the BoundablePair list.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBoundablePairDistanceComparator
(boolean normalOrder) Instantiates a new boundable pair distance comparator. -
Method Summary
Modifier and TypeMethodDescriptionint
compare
(org.locationtech.jts.index.strtree.BoundablePair p1, org.locationtech.jts.index.strtree.BoundablePair p2) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
BoundablePairDistanceComparator
public BoundablePairDistanceComparator(boolean normalOrder) Instantiates a new boundable pair distance comparator.- Parameters:
normalOrder
- true puts the lowest record at the head of this queue. This is the natural order. PriorityQueue peek() will get the least element.
-
-
Method Details
-
compare
public int compare(org.locationtech.jts.index.strtree.BoundablePair p1, org.locationtech.jts.index.strtree.BoundablePair p2) - Specified by:
compare
in interfaceComparator<org.locationtech.jts.index.strtree.BoundablePair>
-