Class BasicStorable.MdateComparator<T extends Storable>

  • Type Parameters:
    T - the class of comparable storable type
    All Implemented Interfaces:
    java.util.Comparator<T>
    Direct Known Subclasses:
    Publication.DdateComparator
    Enclosing class:
    BasicStorable

    public static class BasicStorable.MdateComparator<T extends Storable>
    extends java.lang.Object
    implements java.util.Comparator<T>
    Compares two Storables using their Mdate in descending order (newest date first). Default to Id Comparison : - If any Mdate of is null. - If Mdate are the equals. Note: this comparator imposes orderings that are inconsistent with equals.
    • Constructor Summary

      Constructors 
      Constructor Description
      MdateComparator()  
    • Method Summary

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

      • MdateComparator

        public MdateComparator()
    • Method Detail

      • compare

        public int compare​(T s1,
                           T s2)
        Specified by:
        compare in interface java.util.Comparator<T extends Storable>