Class NullSafeComparator<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(T o1, T o2)  
      protected abstract int compareNonNull​(T o1, T 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

      • NullSafeComparator

        NullSafeComparator()
    • Method Detail

      • compare

        public int compare​(T o1,
                           T o2)
        Specified by:
        compare in interface java.util.Comparator<T>
      • compareNonNull

        protected abstract int compareNonNull​(T o1,
                                              T o2)