public class Util
extends java.lang.Object
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
containsElement(java.lang.Object obj,
java.lang.Object element)
Returns
true if first argument contains provided element. |
static boolean |
equals(java.lang.Object obj1,
java.lang.Object obj2)
Safely compares two objects just like
equals() would, except
it allows any of the 2 objects to be null. |
static int |
length(java.lang.Object obj)
Returns length of the object.
|
static java.lang.String |
toString(java.lang.Object value)
Returns string representation of an object, while checking for
null. |
public static boolean equals(java.lang.Object obj1,
java.lang.Object obj2)
equals() would, except
it allows any of the 2 objects to be null.true if arguments are equal, otherwise falsepublic static java.lang.String toString(java.lang.Object value)
null.public static int length(java.lang.Object obj)
0 for null.
Returns -1 for objects without a length.public static boolean containsElement(java.lang.Object obj,
java.lang.Object element)
true if first argument contains provided element.
It works for strings, collections, maps and arrays.
sCopyright © 2003-present Jodd Team