public class BoundablePairDistanceComparator extends java.lang.Object implements java.util.Comparator<BoundablePair>, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
normalOrder
The normal order.
|
Constructor and Description |
---|
BoundablePairDistanceComparator(boolean normalOrder)
Instantiates a new boundable pair distance comparator.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(BoundablePair p1,
BoundablePair p2) |
public BoundablePairDistanceComparator(boolean normalOrder)
normalOrder
- The true means puts the least record at the head of this queue.
This is the natural order. PriorityQueue peek() will get the least element. Vice versa.public int compare(BoundablePair p1, BoundablePair p2)
compare
in interface java.util.Comparator<BoundablePair>