Class Util
java.lang.Object
ecmwf.common.text.Util
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanChecks if the options are empty (null or contains no option).static booleanChecks if the message is empty (null or contains no character).static booleanisEmpty(Collection<?> collection) Checks if the collection is empty (null or contains no element).static booleanChecks if the list is empty (null or contains no element).static booleanisNotEmpty(Options options) Checks if the options are not empty (not null and contains at least one option).static booleanisNotEmpty(String message) Checks if the message is not empty (not null and contains at least one character).static booleanisNotEmpty(Collection<?> collection) Checks if the collection is not empty (not null and contains at least one element).static booleanisNotEmpty(List<?> list) Checks if the list is not empty (not null and contains at least one element).static ObjectnullToNone(Object object) If the message is null then translate it to none.
-
Method Details
-
isNotEmpty
Checks if the message is not empty (not null and contains at least one character).- Parameters:
message- the message- Returns:
- true, if is not empty
-
isNotEmpty
Checks if the options are not empty (not null and contains at least one option).- Parameters:
options- the options- Returns:
- true, if is not empty
-
isNotEmpty
Checks if the list is not empty (not null and contains at least one element).- Parameters:
list- the list- Returns:
- true, if is not empty
-
isNotEmpty
Checks if the collection is not empty (not null and contains at least one element).- Parameters:
collection- the collection- Returns:
- true, if is not empty
-
isEmpty
Checks if the message is empty (null or contains no character).- Parameters:
message- the message- Returns:
- true, if is empty
-
isEmpty
Checks if the options are empty (null or contains no option).- Parameters:
options- the options- Returns:
- true, if is empty
-
isEmpty
Checks if the list is empty (null or contains no element).- Parameters:
list- the list- Returns:
- true, if is empty
-
isEmpty
Checks if the collection is empty (null or contains no element).- Parameters:
collection- the collection- Returns:
- true, if is empty
-
nullToNone
-