Class NullComparator<T>
java.lang.Object
org.magicwerk.brownies.collections.helper.NullComparator<T>
- Type Parameters:
T- element type
- All Implemented Interfaces:
Serializable, Comparator<T>
A NullComparator extends an existing comparator so it can handle null values.
- Author:
- Thomas Mauch
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
NullComparator
Constructor.- Parameters:
comparator- comparator to extendnullsFirst- true to sort nulls first, false to sort null last
-
-
Method Details
-
compare
-
equals
- Specified by:
equalsin interfaceComparator<T>- Overrides:
equalsin classObject
-
hashCode
-