public class DataTypes extends Object
Modifier and Type | Field and Description |
---|---|
static Map<String,Character> |
typesMap
Field description
|
Constructor and Description |
---|
DataTypes() |
Modifier and Type | Method and Description |
---|---|
static char |
decodeTypeIdFromName(String name)
Method description
|
static Object |
decodeValueType(char typeId,
String value)
Method description
|
static String |
encodeTypeIdInName(String name,
Object value)
Method description
|
static boolean |
getProperty(String key,
Boolean def)
Method description
|
static char |
getTypeId(Object instance)
Method description
|
static boolean |
parseBool(String val)
Method description
|
static <T extends Number> |
parseNum(String num,
Class<T> cls,
T def)
Method description
|
static int |
parseSizeInt(String size,
int def)
Method description
|
static String |
stripNameFromTypeId(String name)
Method description
|
static String |
valueToString(Object value)
Method description
|
public static <T extends Number> T parseNum(String num, Class<T> cls, T def)
T
- num
- cls
- def
- public static int parseSizeInt(String size, int def)
size
- def
- public static boolean parseBool(String val)
val
- public static Object decodeValueType(char typeId, String value) throws IllegalArgumentException
typeId
- value
- IllegalArgumentException
public static String valueToString(Object value)
value
- public static char decodeTypeIdFromName(String name)
name
- public static String stripNameFromTypeId(String name)
name
- public static String encodeTypeIdInName(String name, Object value)
name
- value
- public static char getTypeId(Object instance)
instance
- Copyright © 2014 "Tigase, Inc.". All rights reserved.