public abstract class JsonEventObjectBase extends Object implements JsonEventObject
Modifier and Type | Field and Description |
---|---|
static EPTypeClass |
EPTYPE |
Constructor and Description |
---|
JsonEventObjectBase() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addJsonValue(String name,
Object value)
Add a dynamic property value that the json parser encounters.
|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<String,Object>> |
entrySet() |
Object |
get(Object key) |
abstract Map<String,Object> |
getJsonValues()
Returns the dynamic property values (the non-predefined values)
|
abstract Map.Entry<String,Object> |
getNativeEntry(int num)
Returns the name-value pre-declared property including properties of the parent event type if any
|
abstract String |
getNativeKey(int num)
Returns the pre-declared property name including properties names of the parent event type if any
|
abstract int |
getNativeNum(String name)
Returns the index number of a a pre-declared property of the same name including property names of the parent event type if any
|
abstract int |
getNativeSize()
Returns the total number of pre-declared properties available including properties of the parent event type if any
|
abstract Object |
getNativeValue(int num)
Returns the value of a pre-declared property including property values of the parent event type if any
|
boolean |
isEmpty() |
Set<String> |
keySet() |
abstract boolean |
nativeContainsKey(Object key)
Returns the flag whether the key exists as a pre-declared property of the same name including property names of the parent event type if any
|
abstract void |
nativeWrite(JsonWriter writer)
Write the pre-declared properties to the writer
|
Object |
put(String key,
Object value) |
void |
putAll(Map<? extends String,?> m) |
Object |
putIfAbsent(String key,
Object value) |
Object |
remove(Object key) |
boolean |
remove(Object key,
Object value) |
Object |
replace(String key,
Object value) |
boolean |
replace(String key,
Object oldValue,
Object newValue) |
void |
replaceAll(BiFunction<? super String,? super Object,?> function) |
int |
size() |
String |
toString()
Returns the JSON string using
WriterConfig.MINIMAL . |
String |
toString(WriterConfig config)
Returns the JSON string given a writer configuration
|
Collection<Object> |
values() |
void |
write(JsonWriter writer) |
void |
writeTo(Writer writer,
WriterConfig config)
Write JSON to the provided writer and using the provided configuration.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge
public static final EPTypeClass EPTYPE
public abstract void addJsonValue(String name, Object value)
name
- namevalue
- valuepublic abstract Map<String,Object> getJsonValues()
public abstract int getNativeSize()
public abstract Map.Entry<String,Object> getNativeEntry(int num)
num
- index number of the propertyNoSuchElementException
- for invalid indexpublic abstract String getNativeKey(int num)
num
- index number of the propertyNoSuchElementException
- for invalid indexpublic abstract Object getNativeValue(int num)
num
- index number of the propertyNoSuchElementException
- for invalid indexpublic abstract int getNativeNum(String name)
name
- property namepublic abstract boolean nativeContainsKey(Object key)
key
- property namepublic abstract void nativeWrite(JsonWriter writer) throws IOException
writer
- writerIOException
- for IO exceptionspublic void writeTo(Writer writer, WriterConfig config) throws IOException
JsonEventObject
writeTo
in interface JsonEventObject
writer
- writerconfig
- JSON writer settingsIOException
- when an IO exception occurspublic void write(JsonWriter writer) throws IOException
IOException
public boolean containsKey(Object key)
containsKey
in interface Map<String,Object>
public boolean containsValue(Object value)
containsValue
in interface Map<String,Object>
public void replaceAll(BiFunction<? super String,? super Object,?> function)
replaceAll
in interface Map<String,Object>
public Object putIfAbsent(String key, Object value)
putIfAbsent
in interface Map<String,Object>
public String toString(WriterConfig config)
JsonEventObject
toString
in interface JsonEventObject
config
- JSON writer settingspublic String toString()
JsonEventObject
WriterConfig.MINIMAL
.toString
in interface JsonEventObject
toString
in class Object
Copyright © 2005–2021. All rights reserved.