|
JCas v0.3.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcas.util.TextTools
Provides some text utilitiy functions.
| Field Summary | |
protected static String |
characters
Character set for randiom codes. |
protected static Random |
randomObject
Randomizer object to create random numbers. |
| Constructor Summary | |
TextTools()
|
|
| Method Summary | |
static String[] |
enhanceStringArray(String[] a,
String s)
Enhances a String array with another String |
static String |
getRandomCode(int len)
Creates an alphanumeric randomized code of the specified length. |
protected String[] |
getWords(String s,
char[] sep)
Retrieves words from the strings. |
protected String |
joinWords(String[] words)
Joins all strings into one string separated by spaces. |
protected String |
joinWords(String[] words,
int start)
Joins all strings into one string separated by spaces. |
protected String |
joinWords(String[] words,
int start,
int end)
Joins all strings into one string separated by spaces. |
static long[] |
parseStringIntoLongArray(String s)
Creates long[] array from comma separated list of numbers in a string. |
static String |
replace(String s,
String from,
String to)
Replaces a string portion by another string. |
static String |
replaceOnce(String s,
String from,
String to)
Replaces a string portion by another string. |
protected static String |
replaceVariables(String s,
String prefix,
Properties props)
Replaces variables in the string with the appropriate values from the Properties object. |
static String[] |
split(String s,
char pivot)
Splits the string into portions. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static Random randomObject
protected static String characters
| Constructor Detail |
public TextTools()
| Method Detail |
public static String[] split(String s,
char pivot)
public static String replace(String s,
String from,
String to)
public static String replaceOnce(String s,
String from,
String to)
public static String getRandomCode(int len)
public static long[] parseStringIntoLongArray(String s)
public static String[] enhanceStringArray(String[] a,
String s)
protected static String replaceVariables(String s,
String prefix,
Properties props)
s - the stringprefix - the proefix of variable names in the stringprops - the values of variables
protected String[] getWords(String s,
char[] sep)
s - string to be splitsep - characters that denote separators of words
protected String joinWords(String[] words)
words - the string to join
protected String joinWords(String[] words,
int start)
words - the string to joinstart - index of first word
protected String joinWords(String[] words,
int start,
int end)
words - the string to joinstart - index of first wordend - index of last word
|
JCas v0.3.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||