|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public static interface JsonModel.ObjectOps
Operations that can be performed on Json objects (Maps)
| Method Summary | ||
|---|---|---|
boolean |
containsKey(String key)
|
|
Object |
get(String key)
|
|
Double |
getDouble(String key)
Tries to convert the value associated with the key to an Double |
|
Integer |
getInteger(String key)
Tries to convert the value associated with the key to an Integer |
|
Long |
getLong(String key)
Tries to convert the value associated with the key to an Long |
|
String |
getString(String key)
Tries to convert the value associated with the key to an String |
|
Map<String,Object> |
getTarget()
Returns the operation target |
|
JsonModel.ObjectOps |
put(String key,
Object value)
|
|
JsonModel.ObjectOps |
putAll(Map<String,Object> map)
|
|
JsonModel.ObjectOps |
putIfAbsent(String key,
Object value)
Adds the value to the target map if it is not already present |
|
JsonModel.ObjectOps |
remove(String key)
|
|
|
to(Class<T> targetClass)
Map the target of this JsonModel.ObjectOps to the provided class |
|
JsonModel.ObjectOps |
transform(Transformer<Map<String,Object>> transformer)
Allows transformations of the target object. |
|
| Method Detail |
|---|
Map<String,Object> getTarget()
boolean containsKey(String key)
Map.containsKey(Object)
JsonModel.ObjectOps put(String key,
Object value)
Map.put(Object, Object)
JsonModel.ObjectOps putIfAbsent(String key,
Object value)
key - the keyvalue - the value
JsonModel.ObjectOpsObject get(String key)
Map.get(Object)Integer getInteger(String key)
Integer
key - the key
Long getLong(String key)
Long
key - the key
Double getDouble(String key)
Double
key - the key
String getString(String key)
String
key - the key
JsonModel.ObjectOps putAll(Map<String,Object> map)
Map.putAll(java.util.Map)JsonModel.ObjectOps remove(String key)
Map.remove(Object)JsonModel.ObjectOps transform(Transformer<Map<String,Object>> transformer)
JsonModel.ObjectOps will be be replaced
with the Object returned by the Transformer.transform(Object)
transformer - the transformer to use
JsonModel.ObjectOps<T> T to(Class<T> targetClass)
JsonModel.ObjectOps to the provided class
T - template classtargetClass - class to convert the target object to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||