Class NullSafeComparator<T>

  • Type Parameters:
    T - the type of objects that may be compared by this comparator
    All Implemented Interfaces:
    Comparator<T>

    public class NullSafeComparator<T>
    extends Object
    implements Comparator<T>
    A Comparator that will safely compare nulls to be lower or higher than other objects. Can decorate a given Comparator or work on Comparables.
    Since:
    1.2.2
    Author:
    Keith Donald, Juergen Hoeller
    See Also:
    Comparable