|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pluto.util.StringUtils
StringUtils
hosts a couple of utility methods around
strings.
Field Summary | |
static java.lang.String |
lineSeparator
The operating system's line separator ('\n' on UNIX, '\r\n' on Windows) |
Constructor Summary | |
StringUtils()
|
Method Summary | |
static java.lang.Boolean |
booleanOf(java.lang.String aValue)
Returns a Boolean object that corresponds the given value. |
static java.lang.String[] |
copy(java.lang.String[] source)
|
static java.util.Map |
copyParameters(java.util.Map parameters)
|
static java.lang.String |
decode(java.lang.String s)
|
static java.lang.String |
encode(java.lang.String s)
|
static void |
indent(java.lang.StringBuffer buffer,
int indent)
|
static java.lang.String |
nameOf(java.lang.Class aClass)
Returns the short name of the specified class. |
static void |
newLine(java.lang.StringBuffer buffer,
int indent)
|
static java.lang.String |
packageOf(java.lang.Class aClass)
Returns the name of the package of the specified class. |
static java.lang.String |
pathOf(java.lang.String aRoot,
java.lang.String aPath)
Returns a combination of two paths, inserting slashes as appropriate. |
static java.lang.String |
replace(java.lang.String source,
java.lang.String pattern,
java.lang.String replace)
Replace all occurrences of a pattern within a string by a replacement |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String lineSeparator
Constructor Detail |
public StringUtils()
Method Detail |
public static java.lang.String packageOf(java.lang.Class aClass)
aClass
- a class object
public static java.lang.String nameOf(java.lang.Class aClass)
aClass
- a class object
public static java.lang.String pathOf(java.lang.String aRoot, java.lang.String aPath)
aRoot
- a root pathaPath
- a path
public static java.lang.Boolean booleanOf(java.lang.String aValue)
Boolean
object that corresponds the given value.
A value of true
or yes
corresponds to
Boolean.TRUE
and a value of false
or
no
corresponds to Boolean.FALSE
.
The comparions is case-insensitive, but for performance reasons,
lower-case values of true
and false
should be used.
aValue
- to value to convert
public static java.lang.String replace(java.lang.String source, java.lang.String pattern, java.lang.String replace)
source
- The string that should be searchedpattern
- The pattern that should be replacedreplace
- The replacement that should be inserted instead of the pattern
public static void newLine(java.lang.StringBuffer buffer, int indent)
public static void indent(java.lang.StringBuffer buffer, int indent)
public static java.lang.String encode(java.lang.String s)
public static java.lang.String decode(java.lang.String s)
public static java.lang.String[] copy(java.lang.String[] source)
public static java.util.Map copyParameters(java.util.Map parameters)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |