public class JudgeUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
allIs(Collection<?> collection,
Object condition)
Returns if all given collection element is equals condition.
If collection is not null and empty return true. |
static boolean |
allIs(Object[] array,
Object condition)
Returns if all given array element is equals condition.
If array is not null and empty return true. |
static boolean |
allIs(Object array,
Object condition)
Returns true if given array equals given condition or all given array
element equals given condition; false otherwise.
|
static boolean |
allIsFalse(Boolean condition,
Boolean... conditions)
Returns if all given condition is false.
|
static boolean |
allIsNot(Collection<?> collection,
Object condition)
Returns if all given collection element is not equals given condition.
If array is not null and empty return true. |
static boolean |
allIsNot(Object[] array,
Object condition)
Returns if all given array element is not equals given condition.
If array is not null and empty return true. |
static boolean |
allIsNot(Object array,
Object condition)
Returns true if given array is not an array and not equals condition or
given array is an array and all given array element is not equals given
condition; false otherwise.
|
static boolean |
allIsNotNull(Object object,
Object... objects)
Returns if all given object is not null and objects is not empty.
|
static boolean |
allIsNull(Object object,
Object... objects)
Returns if all given object is null.
If only given an array, judge if all given array element is null. If only given a collection, judge if all given collection element is null. If only given an array or collection is not null and empty return true. |
static boolean |
allIsTrue(Boolean condition,
Boolean... conditions)
Returns if all given condition is true.
|
static <T> boolean |
equals(T source,
T target)
Returns if source equals target.
|
static <T extends Comparable<? super T>> |
greaterThan(T object,
T other)
Returns true if object greater than other; false otherwise.
|
static <T extends Comparable<? super T>> |
greaterThanOrEquals(T object,
T other)
Returns true if object equals other or object greater than other; false
otherwise.
|
static boolean |
hasNull(Object object,
Object... objects)
Returns true if at least one given object is null; false otherwise.
|
static boolean |
isNotNull(Object object)
Returns if object is not null.
|
static boolean |
isNull(Object object)
Returns if object is null.
|
static <T extends Comparable<? super T>> |
lessThan(T object,
T other)
Returns true if object less than other; false otherwise.
|
static <T extends Comparable<? super T>> |
lessThanOrEquals(T object,
T other)
Returns true if object equals other or object less than other; false
otherwise.
|
static boolean |
notSame(Object source,
Object target)
Returns if source not equals target.
|
static <T> Boolean |
targetInElements(T target,
T... elements) |
public static <T> boolean equals(T source,
T target)
T - source - any object.target - any object.public static boolean notSame(Object source, Object target)
source - any object.target - any object.public static boolean isNull(Object object)
object - any object.public static boolean allIsNull(Object object, Object... objects)
objects - any objects.public static boolean allIs(Object array, Object condition)
array - object to be tested.condition - object to be tested.public static boolean allIs(Object[] array, Object condition)
array - any array.condition - any objectpublic static boolean allIs(Collection<?> collection, Object condition)
collection - any collection.condition - any objectpublic static boolean isNotNull(Object object)
object - any object.public static boolean allIsNotNull(Object object, Object... objects)
objects - any objects.public static boolean allIsNot(Object[] array, Object condition)
array - any array.condition - any condition.public static boolean allIsNot(Object array, Object condition)
array - object to be tested.condition - object condition to be tested.public static boolean allIsNot(Collection<?> collection, Object condition)
collection - any collection.condition - any condition.public static boolean allIsTrue(Boolean condition, Boolean... conditions)
conditions - any booleans.public static boolean allIsFalse(Boolean condition, Boolean... conditions)
conditions - any booleans.public static boolean hasNull(Object object, Object... objects)
objects - any objects.public static <T extends Comparable<? super T>> boolean greaterThanOrEquals(T object, T other)
object - comparable object to test.other - comparable object to test.public static <T extends Comparable<? super T>> boolean greaterThan(T object, T other)
object - comparable object to test.other - comparable object to test.public static <T extends Comparable<? super T>> boolean lessThanOrEquals(T object, T other)
object - comparable object to test.other - comparable object to test.public static <T extends Comparable<? super T>> boolean lessThan(T object, T other)
object - comparable object to test.other - comparable object to test.public static <T> Boolean targetInElements(T target, T... elements)
Copyright © 2014. All rights reserved.