|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.mguennewig.pobjects.PObjUtils
public final class PObjUtils
Static class with multiple utility methods.
| Method Summary | ||
|---|---|---|
static
|
appendList(T sb,
java.util.Collection<?> list,
java.lang.String sep)
Appends the text representations of the values in the list
to the buffer and inserts the given separator between each. |
|
static boolean |
endsWithIgnoreCase(java.lang.String s,
java.lang.String suffix)
Tests if this string ends with the specified suffix, but ignores case. |
|
static java.lang.String |
join(java.lang.String sep,
java.lang.Object[] list)
Joins the separate elements of list into a single with fields
separated by sep and returns that new string. |
|
static java.lang.String |
lcfirst(java.lang.String str)
Analog to ucfirst(String) but with lower case letter. |
|
static java.lang.String |
quotedString(java.lang.String s)
Returns the string as quoted JAVA string for class generation. |
|
static java.lang.String |
squeeze(java.lang.String s)
Returns the string with multiple whitespace replaced by one. |
|
static boolean |
startsWithIgnoreCase(java.lang.String s,
java.lang.String prefix)
Tests if this string starts with the specified prefix, but ignores case. |
|
static java.lang.String |
toAllCapsCase(java.lang.String str)
Returns a upper case string of the given one, but adds underscores between each change of lower case to upper case, also known as All Caps Case. |
|
static java.lang.Class<?> |
tryToLoadClass(java.lang.String className)
Tries to load the class identified by className. |
|
static java.lang.String |
ucfirst(java.lang.String str)
Like String.toUpperCase() but only affects the first character of the string. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String join(java.lang.String sep,
java.lang.Object[] list)
list into a single with fields
separated by sep and returns that new string.
String.split(String)
public static <T extends java.lang.Appendable & java.lang.CharSequence> void appendList(T sb,
java.util.Collection<?> list,
java.lang.String sep)
list
to the buffer and inserts the given separator between each.
sb - The appendable character sequence to which the generated string
should be appended.list - A list of values whose text representations will be added to
the buffer.sep - The separator which will be inserted between each two text
representations of the values from the list.public static java.lang.String lcfirst(java.lang.String str)
ucfirst(String) but with lower case letter.
public static java.lang.String ucfirst(java.lang.String str)
public static boolean startsWithIgnoreCase(java.lang.String s,
java.lang.String prefix)
This is equivalent to
s.regionMatches(true, 0, prefix, 0, prefix.length()).
java.lang.NullPointerException - if any parameter is null.String.startsWith(String),
String.regionMatches(boolean,int,String,int,int)
public static boolean endsWithIgnoreCase(java.lang.String s,
java.lang.String suffix)
This is equivalent to
s.regionMatches(true, s.length()-prefix.length(), prefix, 0, prefix.length()).
String.endsWith(String),
String.regionMatches(boolean,int,String,int,int)public static java.lang.String squeeze(java.lang.String s)
public static java.lang.String quotedString(java.lang.String s)
public static java.lang.String toAllCapsCase(java.lang.String str)
ex.: Foobar results in FOOBAR, but
FooBar results in FOO_BAR.
public static java.lang.Class<?> tryToLoadClass(java.lang.String className)
className.
className - A full qualified class name.Class.forName(String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||