Package com.smartgridready.utils
Class StringUtil
- java.lang.Object
-
- com.smartgridready.utils.StringUtil
-
public class StringUtil extends java.lang.ObjectImplements utility methods for strings.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetOrEmpty(java.lang.String str)Gets a string or an empty string if the given string is null.static booleanisNotEmpty(java.lang.String str)Tells if a string is not empty.
-
-
-
Method Detail
-
isNotEmpty
public static boolean isNotEmpty(java.lang.String str)
Tells if a string is not empty. Returnsfalsewhen the object is null.- Parameters:
str- the string to check- Returns:
- a boolean
-
getOrEmpty
public static java.lang.String getOrEmpty(java.lang.String str)
Gets a string or an empty string if the given string is null.- Parameters:
str- the string to get- Returns:
- a string
-
-