| java.lang.Object com.jidesoft.comparator.FastComparableComparator
FastComparableComparator | public class FastComparableComparator implements Comparator,Serializable(Code) | | A Comparator that compares Comparable objects.
Throws ClassCastExceptions if the objects are not
Comparable, or if they are null.
Different from
ComparableComparator , it will not throw exception
when the two compareTo methods don't provide an inverse result of each other
as per the Comparable javadoc. We do so mainly to reduce one call to compareTo.
If both objects are null, they will be treated as equal. If one is null and the other
is not, the null value will be treated as smaller then non-null value.
author: bayard@generationjava.com author: JIDE Software |
FastComparableComparator | public FastComparableComparator()(Code) | | Constructs a ComparableComparator.
|
getInstance | public static FastComparableComparator getInstance()(Code) | | Return a shared instance of a ComparableComparator. Developers are
encouraged to use the comparator returned from this method instead of
constructing a new instance to reduce allocation and GC overhead when
multiple comparable comparators may be used in the same VM.
an instance of ComparableComparator. |
|
|