Class StringHelper
- java.lang.Object
-
- org.eclipse.persistence.internal.helper.StringHelper
-
public class StringHelper extends java.lang.ObjectINTERNAL:Purpose: Define any useful
Stringconstants and methods that are missing from the base Java.
-
-
Field Summary
Fields Modifier and Type Field Description static charCRCarriage returnstatic charDOTDot.static java.lang.StringEMPTY_STRINGEmptyString.static charFFForm feedstatic charLEFT_BRACELeft brace.static charLEFT_BRACKETLeft bracket.static charLFLine feed.static java.lang.StringNULL_STRING"null"String.static charQUESTION_MARKVertical bar.static charRIGHT_BRACERight brace.static charRIGHT_BRACKETRight bracket.static charSPACESpace.static charTABHorizontal tab.static charVERTICAL_BARVertical bar.
-
Constructor Summary
Constructors Constructor Description StringHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisBlank(java.lang.String str)Checks ifStringisnull, is empty ("") or contains white spaces only.static java.lang.StringnonNullString(java.lang.String str)Never return null but replace it with"null"String.
-
-
-
Field Detail
-
TAB
public static final char TAB
Horizontal tab.- See Also:
- Constant Field Values
-
LF
public static final char LF
Line feed.- See Also:
- Constant Field Values
-
FF
public static final char FF
Form feed- See Also:
- Constant Field Values
-
CR
public static final char CR
Carriage return- See Also:
- Constant Field Values
-
SPACE
public static final char SPACE
Space.- See Also:
- Constant Field Values
-
LEFT_BRACE
public static final char LEFT_BRACE
Left brace.- See Also:
- Constant Field Values
-
RIGHT_BRACE
public static final char RIGHT_BRACE
Right brace.- See Also:
- Constant Field Values
-
LEFT_BRACKET
public static final char LEFT_BRACKET
Left bracket.- See Also:
- Constant Field Values
-
RIGHT_BRACKET
public static final char RIGHT_BRACKET
Right bracket.- See Also:
- Constant Field Values
-
DOT
public static final char DOT
Dot.- See Also:
- Constant Field Values
-
VERTICAL_BAR
public static final char VERTICAL_BAR
Vertical bar.- See Also:
- Constant Field Values
-
QUESTION_MARK
public static final char QUESTION_MARK
Vertical bar.- See Also:
- Constant Field Values
-
EMPTY_STRING
public static final java.lang.String EMPTY_STRING
EmptyString.- See Also:
- Constant Field Values
-
NULL_STRING
public static final java.lang.String NULL_STRING
"null"String.- See Also:
- Constant Field Values
-
-
Method Detail
-
nonNullString
public static final java.lang.String nonNullString(java.lang.String str)
Never return null but replace it with"null"String.- Parameters:
str- String to be checked for null and eventually replaced with"null"String.- Returns:
- Provided string when not null or
"null"String.
-
isBlank
public static final boolean isBlank(java.lang.String str)
Checks ifStringisnull, is empty ("") or contains white spaces only.- Parameters:
str-Stringto be checked.- Returns:
- Value of
trueif @link String} isnull, is empty ("") or contains white spaces only orfalseotherwise
-
-