public class TypeUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static Map<String,Class<? extends Object>> |
mathTypes |
static Map<Class<? extends Object>,Class<? extends Object>> |
primitiveToWrapper |
static Map<String,Class<? extends Object>> |
primitiveTypes |
static Map<String,Class<? extends Object>> |
types |
static Map<String,Class<? extends Object>> |
wrapperTypes |
| Modifier and Type | Method and Description |
|---|---|
static Map<String,String> |
fromDictionary(Dictionary<String,String> dictionary)
Converts a
Dictionary object to a Map |
static <T> T |
fromString(Class<T> type,
String value)
Converts a String value to an Object of the specified type
|
static Long[] |
toLong(long[] array)
Converts primitive long[] array to Long[]
|
static long[] |
toPrimitive(Long[] array)
Converts Long[] array to primitive
|
public static Map<Class<? extends Object>,Class<? extends Object>> primitiveToWrapper
public static Map<String,String> fromDictionary(Dictionary<String,String> dictionary)
Dictionary object to a Mapdictionary - public static Long[] toLong(long[] array)
array - public static long[] toPrimitive(Long[] array)
array - public static <T> T fromString(Class<T> type, String value)
type - one of types listed in typesvalue - typeIllegalArgumentException - if type or value are null or if the Class type does not support a valueOf() or cannot be converted to
a wrapper typeCopyright © 2015 JBoss by Red Hat. All rights reserved.