public class ComparatorUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.util.Comparator<?> |
NULL_HIGH_COMPARABLE
a comparator that compares
Comparable objects using
nullHighCompareTo(Comparable, Object) |
static java.util.Comparator<?> |
NULL_LOW_COMPARABLE
a comparator that compares
Comparable objects using
nullLowCompareTo(Comparable, Object) |
| Constructor and Description |
|---|
ComparatorUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> java.util.Comparator<T> |
nullHighComparable() |
static <T> int |
nullHighCompareTo(java.lang.Comparable<T> o1,
T o2)
null-safe invocation of
Comparable.compareTo(Object) placing
null at the end of a sorted list (assuming each
null is equal) |
static <T> java.util.Comparator<T> |
nullLowComparable() |
static <T> int |
nullLowCompareTo(java.lang.Comparable<T> o1,
T o2)
null-safe invocation of
Comparable.compareTo(Object) placing
null at the beginning of a sorted list (assuming each
null is equal) |
public static final java.util.Comparator<?> NULL_LOW_COMPARABLE
Comparable objects using
nullLowCompareTo(Comparable, Object)public static final java.util.Comparator<?> NULL_HIGH_COMPARABLE
Comparable objects using
nullHighCompareTo(Comparable, Object)public static final <T> java.util.Comparator<T> nullLowComparable()
NULL_LOW_COMPARABLEpublic static final <T> java.util.Comparator<T> nullHighComparable()
NULL_HIGH_COMPARABLEpublic static <T> int nullLowCompareTo(java.lang.Comparable<T> o1,
T o2)
Comparable.compareTo(Object) placing
null at the beginning of a sorted list (assuming each
null is equal)Comparable.compareTo(Object)public static <T> int nullHighCompareTo(java.lang.Comparable<T> o1,
T o2)
Comparable.compareTo(Object) placing
null at the end of a sorted list (assuming each
null is equal)Comparable.compareTo(Object)Copyright © 2015 Molindo GmbH. All Rights Reserved.