Class Top.Natural<T extends java.lang.Comparable<? super T>>

  • All Implemented Interfaces:
    java.io.Serializable, java.util.Comparator<T>
    Enclosing class:
    Top

    public static class Top.Natural<T extends java.lang.Comparable<? super T>>
    extends java.lang.Object
    implements java.util.Comparator<T>, java.io.Serializable
    A Serializable Comparator that that uses the compared elements' natural ordering.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Natural()  
    • Method Summary

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

      • Natural

        public Natural()
    • Method Detail

      • compare

        public int compare​(T a,
                           T b)
        Specified by:
        compare in interface java.util.Comparator<T extends java.lang.Comparable<? super T>>