at.molindo.utils.data
Class ComparatorUtils
java.lang.Object
at.molindo.utils.data.ComparatorUtils
public class ComparatorUtils
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NULL_LOW_COMPARABLE
public static final Comparator<?> NULL_LOW_COMPARABLE
- a comparator that compares
Comparable objects using
nullLowCompareTo(Comparable, Object)
NULL_HIGH_COMPARABLE
public static final Comparator<?> NULL_HIGH_COMPARABLE
- a comparator that compares
Comparable objects using
nullHighCompareTo(Comparable, Object)
ComparatorUtils
public ComparatorUtils()
nullLowComparable
public static final <T> Comparator<T> nullLowComparable()
- See Also:
NULL_LOW_COMPARABLE
nullHighComparable
public static final <T> Comparator<T> nullHighComparable()
- See Also:
NULL_HIGH_COMPARABLE
nullLowCompareTo
public static <T> int nullLowCompareTo(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)
- Returns:
- a negative integer, zero, or a positive integer as the first
argument is less than, equal to, or greater than the second.
Assuming null is less than any object and equal to itself.
- See Also:
Comparable.compareTo(Object)
nullHighCompareTo
public static <T> int nullHighCompareTo(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)
- Returns:
- a negative integer, zero, or a positive integer as the first
argument is less than, equal to, or greater than the second.
Assuming null is greater than any object and equal to itself.
- See Also:
Comparable.compareTo(Object)
Copyright © 2013 Molindo GmbH. All Rights Reserved.