public final class Convert extends Object
The GNU Lesser General Public License for details.
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
log
The log stream
|
Modifier | Constructor and Description |
---|---|
private |
Convert()
We don't want anyone doing this ...
|
Modifier and Type | Method and Description |
---|---|
static String |
boolean2String(boolean data)
Convert a boolean to a String
|
static String |
int2String(int data)
Convert an int to a String
|
static String |
map2String(Map<? extends Object,? extends Object> commands)
Convert a Map to a Sting
|
static String |
object2String(Object data)
Convert an Object to a String
|
static boolean |
string2Boolean(String data)
Convert a String to a boolean
|
static int |
string2Int(String data)
Convert a String to an int
|
static PropertyMap |
string2Map(String data)
Convert a String to a Map, without type checking
|
static Object |
string2Object(String data)
Convert a String to an Object
|
public static boolean string2Boolean(String data)
data
- the thing to convertpublic static String boolean2String(boolean data)
data
- the thing to convertpublic static int string2Int(String data)
data
- the thing to convertpublic static String int2String(int data)
data
- the thing to convertpublic static Object string2Object(String data) throws InstantiationException, ClassNotFoundException, IllegalAccessException
data
- the thing to convertInstantiationException
- if this data
represents an abstract class,
an interface, an array class, a primitive type, or void;
or if the class has no nullary constructor;
or if the instantiation fails for some other reason.ClassNotFoundException
- if the class is not foundIllegalAccessException
- if the class or its nullary
constructor is not accessible.public static String object2String(Object data)
data
- the thing to convertpublic static PropertyMap string2Map(String data)
data
- the thing to convert