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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BoundablePairDistanceComparator(boolean normalOrder)
Instantiates a new boundable pair distance comparator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(org.locationtech.jts.index.strtree.BoundablePair p1, org.locationtech.jts.index.strtree.BoundablePair p2)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Constructor Detail
-
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 Detail
-
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>
-
-