Package com.sinch.sdk.core.utils
Class StringUtil
java.lang.Object
com.sinch.sdk.core.utils.StringUtil
Utility class for string
-
Method Summary
-
Method Details
-
isEmpty
Check if a string is empty- Parameters:
value
- String to be cheked- Returns:
- true if String is null, empty or contains only spaces characters
- Since:
- 1.0
-
requireNonEmpty
Checks that the specified object reference is notnull
not an empty string. This method is designed primarily for doing parameter validation in methods and constructors- Parameters:
obj
- the object reference to check for nullitymessage
- detail message to be used in the event that aIllegalArgumentException
is thrown- Returns:
obj
if notnull
nor empty- Throws:
IllegalArgumentException
- ifobj
isnull
orempty
-