|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.oclc.da.gdfr.registryprototype.utils.StringUtils
public class StringUtils
StringUtils A class that contains utility methods for string manipulation.
| Constructor Summary | |
|---|---|
StringUtils(java.lang.String str)
Construct an instance of StringUtils with an existing string. |
|
| Method Summary | |
|---|---|
static java.lang.String |
addQuotes(java.lang.String str)
Quote the string specified. |
java.lang.String |
firstToken()
Return the first token of the current string. |
static boolean |
isEmpty(java.lang.String str)
Determine if the string specified is empty (null or blank). |
boolean |
isValidName()
This method will check the string and ensure it is a valid name for IFS objects. |
java.lang.String |
lastToken()
Return the last token of the current string. |
static java.lang.String[] |
list2Array(java.lang.String list)
This method will accept a comma delimited list and parse it out to an array of strings. |
static java.lang.String[] |
list2Array(java.lang.String list,
java.lang.String separator)
This method will accept a delimited list and parse it out to an array of strings. |
java.lang.String |
nthToken(int index)
Return the Nth token of the current string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringUtils(java.lang.String str)
str - The source string to use for subsequent method calls.| Method Detail |
|---|
public static boolean isEmpty(java.lang.String str)
str - The string to check for being empty.public static java.lang.String[] list2Array(java.lang.String list)
list - This is the delimited list of strings to parse
public static java.lang.String[] list2Array(java.lang.String list,
java.lang.String separator)
list - This is the delimited list of strings to parseseparator - This is the character that will be used to delimit the
list
public java.lang.String firstToken()
StringTokenizer. Null is returned if there are
no tokens.public boolean isValidName()
public java.lang.String lastToken()
StringTokenizer. Null is returned if there are
no tokens.public java.lang.String nthToken(int index)
index - The token (substring) number (1 for sirst token, 2 for second,
etc.) to retrieve from the string.
StringTokenizer. Null is returned if index is
greater than the number of tokens.public static java.lang.String addQuotes(java.lang.String str)
str - A string to be quoted.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||