Class Comparators
java.lang.Object
org.springframework.util.comparator.Comparators
Convenient entry point with generically typed factory methods
for common Spring 
Comparator variants.- Since:
 - 5.0
 - Author:
 - Juergen Hoeller
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Comparator<T> Return aComparableadapter.static <T> Comparator<T> Return aComparableadapter which accepts null values and sorts them higher than non-null values.static <T> Comparator<T> nullsHigh(Comparator<T> comparator) Return a decorator for the given comparator which accepts null values and sorts them higher than non-null values.static <T> Comparator<T> nullsLow()Return aComparableadapter which accepts null values and sorts them lower than non-null values.static <T> Comparator<T> nullsLow(Comparator<T> comparator) Return a decorator for the given comparator which accepts null values and sorts them lower than non-null values. 
- 
Constructor Details
- 
Comparators
public Comparators() 
 - 
 - 
Method Details
- 
comparable
 - 
nullsLow
Return aComparableadapter which accepts null values and sorts them lower than non-null values.- See Also:
 
 - 
nullsLow
Return a decorator for the given comparator which accepts null values and sorts them lower than non-null values.- See Also:
 
 - 
nullsHigh
Return aComparableadapter which accepts null values and sorts them higher than non-null values.- See Also:
 
 - 
nullsHigh
Return a decorator for the given comparator which accepts null values and sorts them higher than non-null values.- See Also:
 
 
 -