Top Description Fields Constructors Methods
org.eclipse.persistence.internal.helper

public Class StringHelper

extends Object
Class Inheritance

INTERNAL:

Purpose: Define any useful String constants and methods that are missing from the base Java.

Field Summary

Modifier and TypeField and Description
public static final char
CR

Carriage return

public static final char
DOT

Dot.

public static final String
public static final char
FF

Form feed

public static final char
LEFT_BRACE

Left brace.

public static final char
LEFT_BRACKET

Left bracket.

public static final char
LF

Line feed.

public static final String
public static final char
QUESTION_MARK

Vertical bar.

public static final char
RIGHT_BRACE

Right brace.

public static final char
RIGHT_BRACKET

Right bracket.

public static final char
SPACE

Space.

public static final char
TAB

Horizontal tab.

public static final char
VERTICAL_BAR

Vertical bar.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static final boolean

Returns:

Value of true if @link String} is null, is empty ("") or contains white spaces only or false otherwise
isBlank
(final String
String to be checked.
str
)

Checks if String is null, is empty ("") or contains white spaces only.

public static final String

Returns:

Provided string when not null or "null" String.
nonNullString
(String
String to be checked for null and eventually replaced with "null" String.
str
)

Never return null but replace it with "null" String.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CRback to summary
public static final char CR

Carriage return

DOTback to summary
public static final char DOT

Dot.

EMPTY_STRINGback to summary
public static final String EMPTY_STRING

Empty String.

FFback to summary
public static final char FF

Form feed

LEFT_BRACEback to summary
public static final char LEFT_BRACE

Left brace.

LEFT_BRACKETback to summary
public static final char LEFT_BRACKET

Left bracket.

LFback to summary
public static final char LF

Line feed.

NULL_STRINGback to summary
public static final String NULL_STRING

"null" String.

QUESTION_MARKback to summary
public static final char QUESTION_MARK

Vertical bar.

RIGHT_BRACEback to summary
public static final char RIGHT_BRACE

Right brace.

RIGHT_BRACKETback to summary
public static final char RIGHT_BRACKET

Right bracket.

SPACEback to summary
public static final char SPACE

Space.

TABback to summary
public static final char TAB

Horizontal tab.

VERTICAL_BARback to summary
public static final char VERTICAL_BAR

Vertical bar.

Constructor Detail

StringHelperback to summary
public StringHelper()

Method Detail

isBlankback to summary
public static final boolean isBlank(final String str)

Checks if String is null, is empty ("") or contains white spaces only.

Parameters
str:String

String to be checked.

Returns:boolean

Value of true if @link String} is null, is empty ("") or contains white spaces only or false otherwise

nonNullStringback to summary
public static final String nonNullString(String str)

Never return null but replace it with "null" String.

Parameters
str:String

String to be checked for null and eventually replaced with "null" String.

Returns:String

Provided string when not null or "null" String.