|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.richfaces.cdk.util.ComparatorUtils
public final class ComparatorUtils
Helper methods for comparable types
| Method Summary | ||
|---|---|---|
static
|
nullSafeCompare(T t1,
T t2)
Does null-safe comparison of mutually comparable objects. |
|
static
|
nullSafeEquals(T t1,
T t2)
Null-safe equals check. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T extends java.lang.Comparable<T>> int nullSafeCompare(T t1,
T t2)
Does null-safe comparison of mutually comparable objects.
Obeys common rules of Comparable.compareTo(Object) methods if both objects to compare
are non-null.
If one of the objects is null, but the other is not, then null object
is considered to be less than non-null.
Two null objects are considered as equal.
T - the type of objects that this object may be compared tot1 - the first objectt2 - the second object
public static <T> boolean nullSafeEquals(T t1,
T t2)
Null-safe equals check. Return true if both arguments are null or equal.
T - the type of objects to compare.t1 - t2 -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||