public class ObjectExt
extends java.lang.Object
Obj| Constructor and Description |
|---|
ObjectExt() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
areEqual(java.lang.Object x,
java.lang.Object y)
Returns whether the objects are equal, including whether they are both null.
|
static <A extends java.lang.Comparable<A>> |
compare(A x,
A y)
Compares the two objects, including testing for null.
|
static boolean |
equal(java.lang.Object x,
java.lang.Object y)
Returns whether the objects are equal, including whether they are both null.
|
static boolean |
isEmpty(java.lang.Object obj)
Returns whether the object is null or is a string or collection of zero length.
|
static boolean |
isFalse(java.lang.Object obj)
Returns whether the object is null or is a string or collection of zero length.
|
static boolean |
isNotNull(java.lang.Object obj)
Returns whether the object is not null.
|
static boolean |
isNull(java.lang.Object obj)
Returns whether the object is null.
|
static boolean |
isTrue(java.lang.Object obj)
Returns whether the object is non-null and, if it is a collection or a string, has a length
greater than zero.
|
public static boolean areEqual(java.lang.Object x,
java.lang.Object y)
x - the first object to comparey - the second object to comparepublic static boolean equal(java.lang.Object x,
java.lang.Object y)
areEqual, only more concise.x - the first object to comparey - the second object to compareareEqual(java.lang.Object, java.lang.Object)public static <A extends java.lang.Comparable<A>> int compare(A x,
A y)
A - the type of objects; is Comparablex - the first object to comparey - the second object to comparepublic static boolean isTrue(java.lang.Object obj)
obj - the objectisEmpty(java.lang.Object),
isFalse(java.lang.Object),
Obj.isTrue()public static boolean isFalse(java.lang.Object obj)
obj - the objectisEmpty(java.lang.Object),
isFalse(java.lang.Object),
Obj.isFalse()public static boolean isEmpty(java.lang.Object obj)
obj - the objectisEmpty(java.lang.Object),
isFalse(java.lang.Object),
Obj.isEmpty()public static boolean isNull(java.lang.Object obj)
obj - the objectisNotNull(java.lang.Object)public static boolean isNotNull(java.lang.Object obj)
obj - the objectisNull(java.lang.Object)