Module org.dyn4j

Class MinXYPointComparator

  • All Implemented Interfaces:
    java.util.Comparator<Vector2>

    final class MinXYPointComparator
    extends java.lang.Object
    implements java.util.Comparator<Vector2>
    Represents a comparator that sorts points by their x coordinate lowest to highest then by the y coordinate lowest to highest.
    Since:
    2.2.0
    Version:
    3.4.0
    Author:
    William Bittle
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(Vector2 p1, Vector2 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

      • MinXYPointComparator

        MinXYPointComparator()
    • Method Detail

      • compare

        public int compare​(Vector2 p1,
                           Vector2 p2)
        Specified by:
        compare in interface java.util.Comparator<Vector2>