Class JsonObjectImpl
- java.lang.Object
-
- org.apache.activemq.artemis.json.impl.JsonValueImpl
-
- org.apache.activemq.artemis.json.impl.JsonObjectImpl
-
- All Implemented Interfaces:
java.util.Map<java.lang.String,JsonValue>,JsonObject,JsonValue
public class JsonObjectImpl extends JsonValueImpl implements JsonObject
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.activemq.artemis.json.JsonValue
JsonValue.ValueType
-
-
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(java.lang.Object key)booleancontainsValue(java.lang.Object value)java.util.Set<java.util.Map.Entry<java.lang.String,JsonValue>>entrySet()JsonValueget(java.lang.Object key)booleangetBoolean(java.lang.String name)booleangetBoolean(java.lang.String name, boolean defaultValue)intgetInt(java.lang.String name)intgetInt(java.lang.String name, int defaultValue)JsonArraygetJsonArray(java.lang.String name)JsonNumbergetJsonNumber(java.lang.String name)JsonObjectgetJsonObject(java.lang.String name)JsonStringgetJsonString(java.lang.String name)javax.json.JsonObjectgetRawObject()java.lang.StringgetString(java.lang.String name)java.lang.StringgetString(java.lang.String name, java.lang.String defaultValue)booleanisEmpty()booleanisNull(java.lang.String name)java.util.Set<java.lang.String>keySet()JsonValueput(java.lang.String key, JsonValue value)voidputAll(java.util.Map<? extends java.lang.String,? extends JsonValue> m)JsonValueremove(java.lang.Object key)intsize()java.util.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
-
-
-
-
Method Detail
-
getRawObject
public javax.json.JsonObject getRawObject()
-
getJsonArray
public JsonArray getJsonArray(java.lang.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(java.lang.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(java.lang.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(java.lang.String name)
- Specified by:
getJsonStringin interfaceJsonObject- Returns:
- the JsonString with the given name or
nullif there is no attribute with that name
-
getString
public java.lang.String getString(java.lang.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 java.lang.String getString(java.lang.String name, java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.String name)
- Specified by:
isNullin interfaceJsonObject- Returns:
- whether the attribute with the given name is
JsonValue.NULL
-
size
public int size()
- Specified by:
sizein interfacejava.util.Map<java.lang.String,JsonValue>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacejava.util.Map<java.lang.String,JsonValue>
-
containsKey
public boolean containsKey(java.lang.Object key)
- Specified by:
containsKeyin interfacejava.util.Map<java.lang.String,JsonValue>
-
containsValue
public boolean containsValue(java.lang.Object value)
- Specified by:
containsValuein interfacejava.util.Map<java.lang.String,JsonValue>
-
get
public JsonValue get(java.lang.Object key)
- Specified by:
getin interfacejava.util.Map<java.lang.String,JsonValue>
-
put
public JsonValue put(java.lang.String key, JsonValue value)
- Specified by:
putin interfacejava.util.Map<java.lang.String,JsonValue>
-
remove
public JsonValue remove(java.lang.Object key)
- Specified by:
removein interfacejava.util.Map<java.lang.String,JsonValue>
-
putAll
public void putAll(java.util.Map<? extends java.lang.String,? extends JsonValue> m)
- Specified by:
putAllin interfacejava.util.Map<java.lang.String,JsonValue>
-
clear
public void clear()
- Specified by:
clearin interfacejava.util.Map<java.lang.String,JsonValue>
-
keySet
public java.util.Set<java.lang.String> keySet()
- Specified by:
keySetin interfacejava.util.Map<java.lang.String,JsonValue>
-
values
public java.util.Collection<JsonValue> values()
- Specified by:
valuesin interfacejava.util.Map<java.lang.String,JsonValue>
-
-