|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--mark.core.text.Util
Util is a class that contains a number of simple static utility methods.
| Constructor Summary | |
Util()
|
|
| Method Summary | |
static java.lang.String |
format(double d)
Converts a double to a string, formatted with six digits after the decimal point. |
static java.lang.String |
format(int n,
int numDigits)
Converts an integer to a string, formatted to fill at least the given number of digits. |
static java.lang.String |
join(java.lang.String delimiter,
java.util.Collection comps)
Joins strings into a single string based on a delimeter String. |
static java.lang.String |
replace(java.lang.String s,
java.lang.String replace,
java.lang.String with)
Replaces every occurrence of one substring with another. |
static java.lang.String |
shorten(double d)
Converts a double to a string. |
static java.util.LinkedList |
split(java.lang.String delim,
java.lang.String str)
Splits a string into compoments based on a separator String. |
static java.util.LinkedList |
toCollection(java.lang.String[] args)
Converts an array of Strings to a LinkedList of strings. |
static java.lang.String[] |
toSortedStringArray(java.util.Collection c)
Calls toStringArray and then sorts the result. |
static java.lang.String[] |
toStringArray(java.util.Collection c)
Converts a collection of Strings into an array of strings. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Util()
| Method Detail |
public static java.util.LinkedList split(java.lang.String delim,
java.lang.String str)
delim - the delimiter.str - the String.
public static java.lang.String join(java.lang.String delimiter,
java.util.Collection comps)
comps - a Collection containing the Strings to join.
public static java.lang.String format(double d)
d - the double.
public static java.lang.String shorten(double d)
d - the double.
public static java.lang.String format(int n,
int numDigits)
n - the int.numDigits - the number of digits.
public static java.util.LinkedList toCollection(java.lang.String[] args)
args - the array of Strings.
public static java.lang.String[] toStringArray(java.util.Collection c)
public static java.lang.String[] toSortedStringArray(java.util.Collection c)
public static java.lang.String replace(java.lang.String s,
java.lang.String replace,
java.lang.String with)
s - the string to replace.replace - replace this string.with - with this string.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||