Class Regions.AngleSorter

  • All Implemented Interfaces:
    java.util.Comparator<CoordinateID>
    Enclosing class:
    Regions

    public static class Regions.AngleSorter
    extends java.lang.Object
    implements java.util.Comparator<CoordinateID>
    A comparator the sorts coordinates with respect to the angle to the coordinate at the lower right of a set of coordinates.
    Author:
    stm
    • Constructor Summary

      Constructors 
      Constructor Description
      AngleSorter​(java.util.List<CoordinateID> result)
      Initializes the comparator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(CoordinateID o1, CoordinateID o2)  
      • 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

      • AngleSorter

        public AngleSorter​(java.util.List<CoordinateID> result)
        Initializes the comparator. The sort order will be: The point at the lower right (w.r.t. the geometric position on the Eressea map) lowest, then the other coordinates in increasing order of their angle to the lower right point.
        Parameters:
        result -