|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.fckeditor.tool.Utils
public class Utils
Static helper methods for strings.
| Field Summary | |
|---|---|
static String |
EMPTY_STRING
The empty string "". |
| Constructor Summary | |
|---|---|
Utils()
|
|
| Method Summary | |
|---|---|
static Set<String> |
getSet(String stringList)
Constructs a set of lower-cased strings from a | (pipe)
delimited string. |
static Set<String> |
getSet(String stringList,
String delimiter)
Constructs a set of lower-cased strings from a delimiter-separated string. |
static boolean |
isBlank(String str)
Checks if a string is whitespace, empty ("") or null. |
static boolean |
isEmpty(String str)
Checks if a string is empty ("") or null. |
static boolean |
isNotBlank(String str)
Checks if a string is not empty (""), not null and not whitespace. |
static boolean |
isNotEmpty(String str)
Checks if a string is not empty ("") and not null. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String EMPTY_STRING
"".
| Constructor Detail |
|---|
public Utils()
| Method Detail |
|---|
public static Set<String> getSet(String stringList,
String delimiter)
stringList - strings separated with a delimiterdelimiter - separating delimiter
IllegalArgumentException - if delimiter is emptypublic static Set<String> getSet(String stringList)
| (pipe)
delimited string.
stringList - strings separated with a delimiter
IllegalArgumentException - if delimiter is emptygetSet(String, String)public static boolean isEmpty(String str)
str - string to check, may be null
true if the string is null or empty,
else falsepublic static boolean isNotEmpty(String str)
str - string to check, may be null
true if the string is not empty and not
null, else falsepublic static boolean isBlank(String str)
Character.isWhitespace(char).
str - string to check, may be null
true if the string is null, empty or
whitespacepublic static boolean isNotBlank(String str)
str - string to check, may be null
true if the string is not null, not
empty and not whitespace.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||