|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cosylab.util.StringUtilities
public final class StringUtilities
Usefull methods for working with strings.
Method Summary | |
---|---|
static java.lang.Object |
arrayFromString(java.lang.String arrayString,
java.lang.Class arrayClass)
DOCUMENT ME! |
static java.lang.Object |
arrayFromString(java.lang.String arrayString,
java.lang.Class arrayClass,
java.lang.String separator,
boolean parentheses)
DOCUMENT ME! |
static java.lang.Class |
classFromString(java.lang.String sValue)
DOCUMENT ME! |
static java.lang.Object |
fromString(java.lang.String sValue,
java.lang.Class targetClass)
DOCUMENT ME! |
static boolean |
isTrueNumber(java.lang.String value)
Checks if string unambiguously represents double value. |
static double |
parseDouble(java.lang.String s)
Simple, robust floating point number parsing, it returns NaN if parsing fails, no exception thrown. |
static java.lang.String |
printBytes(long bytes)
Prints bytes with human readable format. |
static void |
printBytes(long bytes,
java.io.PrintWriter pr)
Prints bytes with human readable format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.Object fromString(java.lang.String sValue, java.lang.Class targetClass) throws CommonException
sValue
- DOCUMENT ME!targetClass
- DOCUMENT ME!
CommonException
- DOCUMENT ME!public static java.lang.Class classFromString(java.lang.String sValue) throws CommonException
sValue
- DOCUMENT ME!
CommonException
- DOCUMENT ME!public static java.lang.Object arrayFromString(java.lang.String arrayString, java.lang.Class arrayClass) throws CommonException
arrayString
- DOCUMENT ME!arrayClass
- DOCUMENT ME!
CommonException
- DOCUMENT ME!public static java.lang.Object arrayFromString(java.lang.String arrayString, java.lang.Class arrayClass, java.lang.String separator, boolean parentheses) throws CommonException
arrayString
- DOCUMENT ME!arrayClass
- DOCUMENT ME!separator
- DOCUMENT ME!parentheses
- DOCUMENT ME!
CommonException
- DOCUMENT ME!public static final double parseDouble(java.lang.String s)
NaN
if parsing fails, no exception thrown.
The parser is derived from the following regular expression:
[+-]?[0-9](\.[0-9])?((e[+-]?)[0-9])?
s
- input string
public static boolean isTrueNumber(java.lang.String value)
false
is
returned. Method parseDouble
tries to convert to double
any
value
- the String to be tested
true
only if string unambiguously represents double
valuepublic static void printBytes(long bytes, java.io.PrintWriter pr)
bytes
- file or memory size in bytespr
- print writerpublic static java.lang.String printBytes(long bytes)
bytes
- file or memory size in bytes
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |