Class SpatialSingleMaxComparator

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

    public class SpatialSingleMaxComparator
    extends java.lang.Object
    implements java.util.Comparator<SpatialComparable>
    Comparator for sorting spatial objects by the maximum value in a single dimension.
    Since:
    0.6.0
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) int dim
      Current dimension.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(SpatialComparable o1, SpatialComparable o2)  
      void setDimension​(int dim)
      Set the dimension to sort by.
      • 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
    • Field Detail

      • dim

        int dim
        Current dimension.
    • Constructor Detail

      • SpatialSingleMaxComparator

        public SpatialSingleMaxComparator​(int dim)
        Constructor.
        Parameters:
        dim - Dimension to sort by.
    • Method Detail

      • setDimension

        public void setDimension​(int dim)
        Set the dimension to sort by.
        Parameters:
        dim - Dimension