public class JSONObjectValue extends JSONValue
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(java.lang.String key)
Returns
true if and only if the given key is present in this JSON object. |
static JSONObjectValue |
fromMap(java.util.Map<java.lang.String,JSONValue> jsonObjectMap)
Factory method for creating a new
JSONObjectValue. |
JSONValue |
get(java.lang.String key)
Returns the value to which the specified key is mapped,
or
null if this map contains no mapping for the key. |
boolean |
isObject()
Get a boolean indicating whether this instance represents an JSON object value or not.
|
java.util.Set<java.lang.String> |
keySet()
Returns a
Set view of the keys contained in this JSON object. |
int |
size()
Get the size of this JSON array.
|
public static JSONObjectValue fromMap(java.util.Map<java.lang.String,JSONValue> jsonObjectMap)
JSONObjectValue.jsonObjectMap - The map storing the keys and values of the JSON object.JSONObjectValue or null if argument is null.public boolean isObject()
JSONValuepublic java.util.Set<java.lang.String> keySet()
Set view of the keys contained in this JSON object.public int size()
public boolean containsKey(java.lang.String key)
true if and only if the given key is present in this JSON object.key - The key to test whether it's present or not in this JSON object.true if the key is present in this JSON object, false otherwise.public JSONValue get(java.lang.String key)
null if this map contains no mapping for the key.key - the key whose associated JSON value is to be returnednull if no such key exists.