Top Constructors Methods
com.rometools.utils

public final Class Strings

extends Object
Class Inheritance
Imports
java.util.Locale

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static boolean

Returns:

true when the String is null, empty or blank, false otherwise
isBlank
(final String
The String to check
s
)

Checks whether a String is null, empty or blank.

public static boolean

Returns:

true when the String is null or empty, false otherwise
isEmpty
(final String
The String to check
s
)

Checks whether a String is null or empty.

public static boolean

Returns:

true when the String is neither null nor empty, false otherwise
isNotEmpty
(final String
The String to check
s
)

Checks whether a String is neither null nor empty.

public static boolean

Returns:

true when the String is null, false otherwise
isNull
(final String
The String to check
s
)

Checks whether a String is null.

public static String

Returns:

null when the input String is null, the String in lower-case otherwise
toLowerCase
(final String
The String to process, may be null
s
)

null-safe lower-case conversion of a String.

public static String

Returns:

null when the input String is null, the trimmed String otherwise
trim
(final String
The String to trim, may be null
s
)

Removes the whitespace at the beginning and end of a String.

public static String

Returns:

null when the input String is null or does only contain whitespace, the trimmed String otherwise
trimToEmpty
(final String
The String to trim, may be null
s
)

Removes the whitespace at the beginning and end of a String.

public static String

Returns:

null when the input String is null or does only contain whitespace, the trimmed String otherwise
trimToNull
(final String
The String to trim, may be null
s
)

Removes the whitespace at the beginning and end of a String.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Stringsback to summary
private Strings()

Method Detail

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

Checks whether a String is null, empty or blank.

Parameters
s:String

The String to check

Returns:boolean

true when the String is null, empty or blank, false otherwise

isEmptyback to summary
public static boolean isEmpty(final String s)

Checks whether a String is null or empty.

Parameters
s:String

The String to check

Returns:boolean

true when the String is null or empty, false otherwise

isNotEmptyback to summary
public static boolean isNotEmpty(final String s)

Checks whether a String is neither null nor empty.

Parameters
s:String

The String to check

Returns:boolean

true when the String is neither null nor empty, false otherwise

isNullback to summary
public static boolean isNull(final String s)

Checks whether a String is null.

Parameters
s:String

The String to check

Returns:boolean

true when the String is null, false otherwise

toLowerCaseback to summary
public static String toLowerCase(final String s)

null-safe lower-case conversion of a String.

Parameters
s:String

The String to process, may be null

Returns:String

null when the input String is null, the String in lower-case otherwise

trimback to summary
public static String trim(final String s)

Removes the whitespace at the beginning and end of a String.

Parameters
s:String

The String to trim, may be null

Returns:String

null when the input String is null, the trimmed String otherwise

trimToEmptyback to summary
public static String trimToEmpty(final String s)

Removes the whitespace at the beginning and end of a String. When the String only contains whitespace, it returns null.

Parameters
s:String

The String to trim, may be null

Returns:String

null when the input String is null or does only contain whitespace, the trimmed String otherwise

trimToNullback to summary
public static String trimToNull(final String s)

Removes the whitespace at the beginning and end of a String. When the String only contains whitespace, it returns null.

Parameters
s:String

The String to trim, may be null

Returns:String

null when the input String is null or does only contain whitespace, the trimmed String otherwise