Package rife.bld.extension.tools
Class ObjectTools
java.lang.Object
rife.bld.extension.tools.ObjectTools
Object Tools.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisAnyNull(Collection<?> collection) Checks if any element in the collection isnull.static <T> booleanisAnyNull(T... objects) Checks if any of the provided objects arenull.static booleanisEmpty(Collection<?> collection) Checks if the provided collection is empty ornull.static booleanChecks if the providedMapis empty ornull.static <T> booleanisEmpty(T[] array) Checks if the provided array is empty ornull.static <T> booleanisEmpty(T[]... arrays) Checks if all provided arrays are empty ornull.static booleanisNotEmpty(Collection<?> collection) Checks if the provided collection is notnulland not empty.static booleanisNotEmpty(Map<?, ?> map) Checks if the providedMapis notnulland not empty.static <T> booleanisNotEmpty(T[] array) Checks if the provided array is notnulland not empty.static <T> booleanisNotEmpty(T[]... arrays) Checks if any of the provided arrays are notnulland not empty.static booleanisNotNull(Collection<?> collection) Checks if all elements in the collection are non-null.static <T> booleanisNotNull(T... objects) Checks if all provided objects are non-null.static booleanisNull(Collection<?> collection) Checks if all elements in the collection arenull.static <T> booleanisNull(T... objects) Checks if all provided objects arenull.
-
Method Details
-
isAnyNull
Checks if any of the provided objects arenull.- Parameters:
objects- the objects to check- Returns:
trueif any object isnull,falseotherwise- Since:
- 1.0
-
isAnyNull
Checks if any element in the collection isnull.- Parameters:
collection- the collection to check- Returns:
trueif any element isnull,falseotherwise- Since:
- 1.0
-
isEmpty
public static <T> boolean isEmpty(T[] array) Checks if the provided array is empty ornull.- Parameters:
array- The array to check; can benull- Returns:
trueif the array isnullor empty;falseotherwise- Since:
- 1.0
-
isEmpty
Checks if the providedMapis empty ornull.- Parameters:
map- The map to check; can benull- Returns:
trueif the map isnullor empty;falseotherwise- Since:
- 1.0
-
isEmpty
Checks if all provided arrays are empty ornull.- Parameters:
arrays- The arrays to check; can benullor containnullelements- Returns:
trueif all arrays arenullor empty;falseif any array is not empty- Since:
- 1.0
-
isEmpty
Checks if the provided collection is empty ornull.- Parameters:
collection- The collection to check; can benull- Returns:
trueif the collection isnullor empty;falseotherwise- Since:
- 1.0
-
isEmpty
Checks if all provided collections are empty ornull.- Parameters:
collections- The collections to check; can benullor containnullelements- Returns:
trueif all collections arenullor empty;falseif any collection is not empty- Since:
- 1.0
-
isNotEmpty
public static <T> boolean isNotEmpty(T[] array) Checks if the provided array is notnulland not empty.- Parameters:
array- The array to check; can benull- Returns:
trueif the array is notnulland not empty;falseotherwise- Since:
- 1.0
-
isNotEmpty
Checks if the providedMapis notnulland not empty.- Parameters:
map- The map to check; can benull- Returns:
trueif the map is notnulland not empty;falseotherwise- Since:
- 1.0
-
isNotEmpty
Checks if any of the provided arrays are notnulland not empty.- Parameters:
arrays- The arrays to check; can benullor containnullelements- Returns:
trueif any array is notnulland not empty;falseif all arenullor empty- Since:
- 1.0
-
isNotEmpty
Checks if the provided collection is notnulland not empty.- Parameters:
collection- The collection to check; can benull- Returns:
trueif the collection is notnulland not empty;falseotherwise- Since:
- 1.0
-
isNotEmpty
Checks if any of the provided collections are notnulland not empty.- Parameters:
collections- The collections to check; can benullor containnullelements- Returns:
trueif any collection is notnulland not empty;falseif all arenullor empty- Since:
- 1.0
-
isNotNull
Checks if all provided objects are non-null.- Parameters:
objects- the objects to check- Returns:
trueif all objects are non-null,falseotherwise- Since:
- 1.0
-
isNotNull
Checks if all elements in the collection are non-null.- Parameters:
collection- the collection to check- Returns:
trueif all elements are non-null,falseotherwise- Since:
- 1.0
-
isNull
Checks if all provided objects arenull.- Parameters:
objects- the objects to check- Returns:
trueif all objects arenull,falseotherwise- Since:
- 1.0
-
isNull
Checks if all elements in the collection arenull.- Parameters:
collection- the collection to check- Returns:
trueif all elements arenull,falseotherwise- Since:
- 1.0
-