Class JsonObjectImpl
- java.lang.Object
-
- org.apache.activemq.artemis.json.impl.JsonValueImpl
-
- org.apache.activemq.artemis.json.impl.JsonObjectImpl
-
- All Implemented Interfaces:
Map<String,JsonValue>,JsonObject,JsonValue
public class JsonObjectImpl extends JsonValueImpl implements JsonObject
-
-
Field Summary
-
Fields inherited from interface org.apache.activemq.artemis.json.JsonValue
EMPTY_JSON_ARRAY, EMPTY_JSON_OBJECT, FALSE, NULL, TRUE
-
-
Constructor Summary
Constructors Constructor Description JsonObjectImpl(javax.json.JsonObject rawObject)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(Object key)booleancontainsValue(Object value)Set<Map.Entry<String,JsonValue>>entrySet()JsonValueget(Object key)booleangetBoolean(String name)booleangetBoolean(String name, boolean defaultValue)intgetInt(String name)intgetInt(String name, int defaultValue)JsonArraygetJsonArray(String name)JsonNumbergetJsonNumber(String name)JsonObjectgetJsonObject(String name)JsonStringgetJsonString(String name)javax.json.JsonObjectgetRawObject()StringgetString(String name)StringgetString(String name, String defaultValue)booleanisEmpty()booleanisNull(String name)Set<String>keySet()JsonValueput(String key, JsonValue value)voidputAll(Map<? extends String,? extends JsonValue> m)JsonValueremove(Object key)intsize()Collection<JsonValue>values()-
Methods inherited from class org.apache.activemq.artemis.json.impl.JsonValueImpl
asJsonArray, asJsonObject, equals, getRawValue, getValueType, hashCode, toString, wrap
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.artemis.json.JsonValue
asJsonArray, asJsonObject, getValueType, toString
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
getRawObject
public javax.json.JsonObject getRawObject()
-
getJsonArray
public JsonArray getJsonArray(String name)
- Specified by:
getJsonArrayin interfaceJsonObject- Returns:
- the JsonArray with the given name or
nullif there is no attribute with that name
-
getJsonObject
public JsonObject getJsonObject(String name)
- Specified by:
getJsonObjectin interfaceJsonObject- Returns:
- the JsonObject with the given name or
nullif there is no attribute with that name
-
getJsonNumber
public JsonNumber getJsonNumber(String name)
- Specified by:
getJsonNumberin interfaceJsonObject- Returns:
- the JsonNumber with the given name or
nullif there is no attribute with that name
-
getJsonString
public JsonString getJsonString(String name)
- Specified by:
getJsonStringin interfaceJsonObject- Returns:
- the JsonString with the given name or
nullif there is no attribute with that name
-
getString
public String getString(String name)
- Specified by:
getStringin interfaceJsonObject- Returns:
- the native string with the given name or
nullif there is no attribute with that name
-
getString
public String getString(String name, String defaultValue)
- Specified by:
getStringin interfaceJsonObject- Returns:
- the native string with the given name or the default value if there is no attribute with that name
-
getInt
public int getInt(String name)
- Specified by:
getIntin interfaceJsonObject- Returns:
- the int with the given name or
nullif there is no attribute with that name
-
getInt
public int getInt(String name, int defaultValue)
- Specified by:
getIntin interfaceJsonObject- Returns:
- the int with the given name or the default value if there is no attribute with that name
-
getBoolean
public boolean getBoolean(String name)
- Specified by:
getBooleanin interfaceJsonObject- Returns:
- the boolean with the given name or
nullif there is no attribute with that name
-
getBoolean
public boolean getBoolean(String name, boolean defaultValue)
- Specified by:
getBooleanin interfaceJsonObject- Returns:
- the boolean with the given name or the default value if there is no attribute with that name
-
isNull
public boolean isNull(String name)
- Specified by:
isNullin interfaceJsonObject- Returns:
- whether the attribute with the given name is
JsonValue.NULL
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap<String,JsonValue>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValuein interfaceMap<String,JsonValue>
-
values
public Collection<JsonValue> values()
-
-