Package org.apache.johnzon.core
Class JsonObjectImpl
- java.lang.Object
-
- java.util.AbstractMap<String,jakarta.json.JsonValue>
-
- org.apache.johnzon.core.JsonObjectImpl
-
- All Implemented Interfaces:
jakarta.json.JsonObject
,jakarta.json.JsonStructure
,jakarta.json.JsonValue
,Serializable
,Map<String,jakarta.json.JsonValue>
final class JsonObjectImpl extends AbstractMap<String,jakarta.json.JsonValue> implements jakarta.json.JsonObject, Serializable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description private Integer
hashCode
private BufferStrategy.BufferProvider<char[]>
provider
private Map<String,jakarta.json.JsonValue>
unmodifieableBackingMap
-
Constructor Summary
Constructors Constructor Description JsonObjectImpl(Map<String,jakarta.json.JsonValue> backingMap, BufferStrategy.BufferProvider<char[]> provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Set<Map.Entry<String,jakarta.json.JsonValue>>
entrySet()
boolean
equals(Object obj)
boolean
getBoolean(String name)
boolean
getBoolean(String name, boolean defaultValue)
int
getInt(String name)
int
getInt(String name, int defaultValue)
jakarta.json.JsonArray
getJsonArray(String name)
jakarta.json.JsonNumber
getJsonNumber(String name)
jakarta.json.JsonObject
getJsonObject(String name)
jakarta.json.JsonString
getJsonString(String name)
String
getString(String name)
String
getString(String name, String defaultValue)
jakarta.json.JsonValue.ValueType
getValueType()
int
hashCode()
boolean
isNull(String name)
jakarta.json.JsonValue
remove(Object key)
String
toString()
private <T> T
value(String name, Class<T> clazz)
private <T> T
valueOrExcpetion(String name, Class<T> clazz)
private Object
writeReplace()
-
Methods inherited from class java.util.AbstractMap
clone, containsKey, containsValue, get, isEmpty, keySet, put, putAll, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, replace, replace, replaceAll, size, values
-
-
-
-
Field Detail
-
provider
private final BufferStrategy.BufferProvider<char[]> provider
-
hashCode
private transient Integer hashCode
-
-
Constructor Detail
-
JsonObjectImpl
JsonObjectImpl(Map<String,jakarta.json.JsonValue> backingMap, BufferStrategy.BufferProvider<char[]> provider)
-
-
Method Detail
-
getJsonArray
public jakarta.json.JsonArray getJsonArray(String name)
- Specified by:
getJsonArray
in interfacejakarta.json.JsonObject
-
getJsonObject
public jakarta.json.JsonObject getJsonObject(String name)
- Specified by:
getJsonObject
in interfacejakarta.json.JsonObject
-
getJsonNumber
public jakarta.json.JsonNumber getJsonNumber(String name)
- Specified by:
getJsonNumber
in interfacejakarta.json.JsonObject
-
getJsonString
public jakarta.json.JsonString getJsonString(String name)
- Specified by:
getJsonString
in interfacejakarta.json.JsonObject
-
getString
public String getString(String name)
- Specified by:
getString
in interfacejakarta.json.JsonObject
-
getString
public String getString(String name, String defaultValue)
- Specified by:
getString
in interfacejakarta.json.JsonObject
-
getInt
public int getInt(String name)
- Specified by:
getInt
in interfacejakarta.json.JsonObject
-
getInt
public int getInt(String name, int defaultValue)
- Specified by:
getInt
in interfacejakarta.json.JsonObject
-
getBoolean
public boolean getBoolean(String name)
- Specified by:
getBoolean
in interfacejakarta.json.JsonObject
-
getBoolean
public boolean getBoolean(String name, boolean defaultValue)
- Specified by:
getBoolean
in interfacejakarta.json.JsonObject
-
isNull
public boolean isNull(String name)
- Specified by:
isNull
in interfacejakarta.json.JsonObject
-
getValueType
public jakarta.json.JsonValue.ValueType getValueType()
- Specified by:
getValueType
in interfacejakarta.json.JsonValue
-
toString
public String toString()
- Specified by:
toString
in interfacejakarta.json.JsonValue
- Overrides:
toString
in classAbstractMap<String,jakarta.json.JsonValue>
-
equals
public boolean equals(Object obj)
-
hashCode
public int hashCode()
-
clear
public void clear()
-
remove
public jakarta.json.JsonValue remove(Object key)
-
writeReplace
private Object writeReplace() throws ObjectStreamException
- Throws:
ObjectStreamException
-
-