java.lang.Object
is.codion.common.NullOrEmpty
Utility methods for checking if arguments are null or empty, if applicable.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Checks if any of the given objects is nullstatic boolean
nullOrEmpty
(String string) Returns true if the given string is null or empty.static boolean
nullOrEmpty
(String... strings) Returns true if any of the given strings is null or empty.static boolean
nullOrEmpty
(Collection<?> collection) Returns true if the given collection is null or empty.static boolean
nullOrEmpty
(Map<?, ?> map) Returns true if the given map is null or empty.
-
Method Details
-
nullOrEmpty
Returns true if the given string is null or empty.- Parameters:
string
- the string to check- Returns:
- true if the given string is null or empty, false otherwise
-
nullOrEmpty
Returns true if any of the given strings is null or empty.- Parameters:
strings
- the strings to check- Returns:
- true if one of the given strings is null or empty or if no arguments are provided, false otherwise
-
nullOrEmpty
Returns true if the given map is null or empty.- Parameters:
map
- the map to check- Returns:
- true if the given map is null or empty, false otherwise
-
nullOrEmpty
Returns true if the given collection is null or empty.- Parameters:
collection
- the collection to check- Returns:
- true if the given collection is null or empty, false otherwise
-
notNull
Checks if any of the given objects is null- Parameters:
objects
- the objects to check- Returns:
- true if none of the given objects is null
-