|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.duelengine.duel.DuelData
public final class DuelData
| Method Summary | ||
|---|---|---|
static
|
asList(T... items)
Builds a mutable List from a sequence of items |
|
static Map<String,Object> |
asMap(Object... pairs)
Builds a mutable Map from an interlaced sequence of key-value pairs |
|
static boolean |
coerceBoolean(Object data)
Coerces any Object to a JS-style Boolean |
|
static Collection<?> |
coerceCollection(Object data)
Coerces any Object to a JS-style Array (List) |
|
static Map<?,?> |
coerceMap(Object data)
Coerces any Object to a JS-style Object (Map) |
|
static double |
coerceNumber(Object data)
Coerces any Object to a JS-style Number (double) |
|
static String |
coerceString(Object data)
Coerces any Object to a JS-style String |
|
static boolean |
containsKey(Object data,
Object key)
Treats the object as a Map and calls containsKey |
|
static boolean |
isArray(Class<?> exprType)
|
|
static boolean |
isBoolean(Class<?> exprType)
|
|
static boolean |
isDate(Class<?> exprType)
|
|
static boolean |
isNumber(Class<?> exprType)
|
|
static boolean |
isPrimitive(Class<?> dataType)
|
|
static boolean |
isString(Class<?> exprType)
|
|
static String |
typeOf(Object data)
Simulates the typeof operator |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Map<String,Object> asMap(Object... pairs)
pairs -
public static <T> List<T> asList(T... items)
items -
public static boolean isPrimitive(Class<?> dataType)
public static boolean isBoolean(Class<?> exprType)
public static boolean isNumber(Class<?> exprType)
public static boolean isString(Class<?> exprType)
public static boolean isArray(Class<?> exprType)
public static boolean isDate(Class<?> exprType)
public static String typeOf(Object data)
data -
public static boolean coerceBoolean(Object data)
data -
public static double coerceNumber(Object data)
data -
public static String coerceString(Object data)
data -
public static Collection<?> coerceCollection(Object data)
data -
public static Map<?,?> coerceMap(Object data)
data -
public static boolean containsKey(Object data,
Object key)
data - key -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||