public class ObjectUtil
extends java.lang.Object
Constructor and Description |
---|
ObjectUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
containsAll(java.util.Collection<?> c1,
java.util.Collection<?> c2) |
static boolean |
equivalent(java.lang.Object o1,
java.lang.Object o2)
Returns true if:
Both Strings are null
Both Strings are equal
|
static boolean |
equivalentCollection(java.util.Collection<?> c1,
java.util.Collection<?> c2) |
static boolean |
equivalentString(java.lang.String s1,
java.lang.String s2)
Deprecated.
|
static boolean |
getBooleanValue(java.lang.String str) |
static boolean |
isAllNulls(java.lang.Iterable<?> array)
Does the specified Iterable only contain nulls ?
|
static boolean |
validArray(java.lang.Object[] arr)
Returns true if the array is not null and has a size greater than zero.
|
static boolean |
validCollection(java.util.Collection<?> collection)
Returns true if the collection is not null and has a size greater than zero.
|
static boolean |
validMap(java.util.Map<?,?> map)
Returns true if the Map is not null and has a size greater than zero.
|
static boolean |
validObject(java.lang.Object... objs)
Returns whether all of the objects are not null
|
static boolean |
validOneString(java.lang.String... strings)
Returns whether at least one of the strings is not null and has a length of greater than zero
after trimming the leading and trailing whitespace
|
static boolean |
validString(java.lang.String... strings)
Returns whether all of the strings are not null and have a length of greater than zero
after trimming the leading and trailing whitespace.
|
public static boolean validString(java.lang.String... strings)
strings
- public static boolean validOneString(java.lang.String... strings)
strings
- public static boolean validObject(java.lang.Object... objs)
strings
- @Deprecated public static boolean equivalentString(java.lang.String s1, java.lang.String s2)
s1
- s2
- public static boolean equivalent(java.lang.Object o1, java.lang.Object o2)
o1
- o2
- public static boolean equivalentCollection(java.util.Collection<?> c1, java.util.Collection<?> c2)
public static boolean containsAll(java.util.Collection<?> c1, java.util.Collection<?> c2)
public static boolean validCollection(java.util.Collection<?> collection)
collection
- public static boolean isAllNulls(java.lang.Iterable<?> array)
array
- The Iterable objectpublic static boolean validArray(java.lang.Object[] arr)
arr
- public static boolean validMap(java.util.Map<?,?> map)
map
- public static boolean getBooleanValue(java.lang.String str)