|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.tools.StringTools
public class StringTools
Contains various string tools.
Method Summary | |
---|---|
static String |
format(String msg,
Object... params)
Processes the message and replaces every %[number] with correspoding Object.toString() from array params with
index [number]. |
static String |
nonNullStr(String str)
Deprecated. use StringUtils.defaultString(str) instead. |
static String |
nullStr(String str)
Deprecated. use StringUtils.defaultIfEmpty(str, null) instead. |
static int |
resolveIndex(String source,
int sourceIndex,
String result)
Tries to resolve the index from given string to the result string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
@Deprecated public static String nonNullStr(String str)
null
string to empty string.
str
- string to convert.
str
was null
, or
str
itself.@Deprecated public static String nullStr(String str)
null
.
str
- string to convert.
null
if given string was empty string or null, str
itself otherwise.public static String format(String msg, Object... params)
Object.toString()
from array params
with
index [number]. 0 is first Object, 1 second etc. Currently only numbers
0-9 are supported.
msg
- message to processparams
- parameters for message
public static int resolveIndex(String source, int sourceIndex, String result)
source
- the result of the transformationsourceIndex
- index into the sourceResult
string.result
- the result string.
result
string.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |