Class 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 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 interface Comparator<org.locationtech.jts.index.strtree.BoundablePair>