Class Util
java.lang.Object
ecmwf.common.text.Util
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Checks if the options are empty (null or contains no option).static boolean
Checks if the message is empty (null or contains no character).static boolean
isEmpty
(Collection<?> collection) Checks if the collection is empty (null or contains no element).static boolean
Checks if the list is empty (null or contains no element).static boolean
isNotEmpty
(Options options) Checks if the options are not empty (not null and contains at least one option).static boolean
isNotEmpty
(String message) Checks if the message is not empty (not null and contains at least one character).static boolean
isNotEmpty
(Collection<?> collection) Checks if the collection is not empty (not null and contains at least one element).static boolean
isNotEmpty
(List<?> list) Checks if the list is not empty (not null and contains at least one element).static Object
nullToNone
(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
-