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 
    ConstructorDescription
    PointDistanceComparator​(java.awt.geom.Point2D relativePoint) 
  • Method Summary

    Modifier and TypeMethodDescription
    intcompare​(java.awt.geom.Point2D point1, java.awt.geom.Point2D point2) 

    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 Details

  • Method Details

    • compare

      public int compare​(java.awt.geom.Point2D point1, java.awt.geom.Point2D point2)
      Specified by:
      compare in interface java.util.Comparator<java.awt.geom.Point2D>