Class PointDistanceComparator
java.lang.Object
de.gurkenlabs.litiengine.util.geom.PointDistanceComparator
- All Implemented Interfaces:
java.util.Comparator<java.awt.geom.Point2D>
public class PointDistanceComparator
extends java.lang.Object
implements java.util.Comparator<java.awt.geom.Point2D>
The Class PointDistanceComparator order points by their distance to the
relative point.
Constructor Summary
Constructors Constructor Description PointDistanceComparator(java.awt.geom.Point2D relativePoint)
Method Summary
Modifier and Type Method Description int
compare(java.awt.geom.Point2D point1, java.awt.geom.Point2D point2)
Constructor Details
PointDistanceComparator
public PointDistanceComparator(java.awt.geom.Point2D relativePoint)
Method Details
compare
public int compare(java.awt.geom.Point2D point1, java.awt.geom.Point2D point2)- Specified by:
compare
in interfacejava.util.Comparator<java.awt.geom.Point2D>