public abstract class JsonEventObjectBase extends Object implements JsonEventObject
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) |
abstract void |
setNativeValue(int num,
Object value)
Returns the index number of a a pre-declared property of the same name including property names of the parent event type if any
|
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) |
protected void |
writeArray2DimBigDecimal(JsonWriter writer,
BigDecimal[][] array) |
protected void |
writeArray2DimBigInteger(JsonWriter writer,
BigInteger[][] array) |
protected void |
writeArray2DimBoolean(JsonWriter writer,
Boolean[][] array) |
protected void |
writeArray2DimBooleanPrimitive(JsonWriter writer,
boolean[][] array) |
protected void |
writeArray2DimByte(JsonWriter writer,
Byte[][] array) |
protected void |
writeArray2DimBytePrimitive(JsonWriter writer,
byte[][] array) |
protected void |
writeArray2DimCharacter(JsonWriter writer,
Character[][] array) |
protected void |
writeArray2DimCharPrimitive(JsonWriter writer,
char[][] array) |
protected void |
writeArray2DimDouble(JsonWriter writer,
Double[][] array) |
protected void |
writeArray2DimDoublePrimitive(JsonWriter writer,
double[][] array) |
protected void |
writeArray2DimFloat(JsonWriter writer,
Float[][] array) |
protected void |
writeArray2DimFloatPrimitive(JsonWriter writer,
float[][] array) |
protected void |
writeArray2DimInteger(JsonWriter writer,
Integer[][] array) |
protected void |
writeArray2DimIntPrimitive(JsonWriter writer,
int[][] array) |
protected void |
writeArray2DimLong(JsonWriter writer,
Long[][] array) |
protected void |
writeArray2DimLongPrimitive(JsonWriter writer,
long[][] array) |
protected void |
writeArray2DimShort(JsonWriter writer,
Short[][] array) |
protected void |
writeArray2DimShortPrimitive(JsonWriter writer,
short[][] array) |
protected void |
writeArray2DimString(JsonWriter writer,
String[][] array) |
protected void |
writeArrayBigDecimal(JsonWriter writer,
BigDecimal[] array) |
protected void |
writeArrayBigInteger(JsonWriter writer,
BigInteger[] array) |
protected void |
writeArrayBoolean(JsonWriter writer,
Boolean[] array) |
protected void |
writeArrayBooleanPrimitive(JsonWriter writer,
boolean[] array) |
protected void |
writeArrayByte(JsonWriter writer,
Byte[] array) |
protected void |
writeArrayBytePrimitive(JsonWriter writer,
byte[] array) |
protected void |
writeArrayCharacter(JsonWriter writer,
Character[] array) |
protected void |
writeArrayCharPrimitive(JsonWriter writer,
char[] array) |
protected void |
writeArrayDouble(JsonWriter writer,
Double[] array) |
protected void |
writeArrayDoublePrimitive(JsonWriter writer,
double[] array) |
protected void |
writeArrayFloat(JsonWriter writer,
Float[] array) |
protected void |
writeArrayFloatPrimitive(JsonWriter writer,
float[] array) |
protected void |
writeArrayInteger(JsonWriter writer,
Integer[] array) |
protected void |
writeArrayIntPrimitive(JsonWriter writer,
int[] array) |
protected void |
writeArrayLong(JsonWriter writer,
Long[] array) |
protected void |
writeArrayLongPrimitive(JsonWriter writer,
long[] array) |
protected void |
writeArrayShort(JsonWriter writer,
Short[] array) |
protected void |
writeArrayShortPrimitive(JsonWriter writer,
short[] array) |
protected void |
writeArrayString(JsonWriter writer,
String[] array) |
protected void |
writeEnumArray(JsonWriter writer,
Object[] array) |
protected void |
writeEnumArray2Dim(JsonWriter writer,
Object[][] array) |
protected void |
writeJsonArray(JsonWriter writer,
String name,
Object[] array) |
protected void |
writeJsonMap(JsonWriter writer,
Map<String,Object> map) |
protected void |
writeJsonValue(JsonWriter writer,
String name,
Object jsonValue) |
protected static void |
writeNested(JsonWriter writer,
JsonEventObjectBase nested) |
protected static void |
writeNestedArray(JsonWriter writer,
JsonEventObjectBase[] nesteds) |
protected void |
writeNullableBoolean(JsonWriter writer,
Boolean value) |
protected void |
writeNullableNumber(JsonWriter writer,
Object value) |
protected void |
writeNullableString(JsonWriter writer,
String value) |
protected void |
writeNullableStringToString(JsonWriter writer,
Object value) |
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 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 void setNativeValue(int num, Object value)
num
- index number of the propertyvalue
- to setNoSuchElementException
- for invalid indexpublic 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
protected void writeNullableString(JsonWriter writer, String value) throws IOException
IOException
protected void writeNullableStringToString(JsonWriter writer, Object value) throws IOException
IOException
protected void writeNullableBoolean(JsonWriter writer, Boolean value) throws IOException
IOException
protected void writeNullableNumber(JsonWriter writer, Object value) throws IOException
IOException
protected void writeArray2DimString(JsonWriter writer, String[][] array) throws IOException
IOException
protected void writeArray2DimCharacter(JsonWriter writer, Character[][] array) throws IOException
IOException
protected void writeArray2DimLong(JsonWriter writer, Long[][] array) throws IOException
IOException
protected void writeArray2DimInteger(JsonWriter writer, Integer[][] array) throws IOException
IOException
protected void writeArray2DimShort(JsonWriter writer, Short[][] array) throws IOException
IOException
protected void writeArray2DimDouble(JsonWriter writer, Double[][] array) throws IOException
IOException
protected void writeArray2DimFloat(JsonWriter writer, Float[][] array) throws IOException
IOException
protected void writeArray2DimByte(JsonWriter writer, Byte[][] array) throws IOException
IOException
protected void writeArray2DimBoolean(JsonWriter writer, Boolean[][] array) throws IOException
IOException
protected void writeArray2DimBigInteger(JsonWriter writer, BigInteger[][] array) throws IOException
IOException
protected void writeArray2DimBigDecimal(JsonWriter writer, BigDecimal[][] array) throws IOException
IOException
protected void writeArray2DimBooleanPrimitive(JsonWriter writer, boolean[][] array) throws IOException
IOException
protected void writeArray2DimBytePrimitive(JsonWriter writer, byte[][] array) throws IOException
IOException
protected void writeArray2DimShortPrimitive(JsonWriter writer, short[][] array) throws IOException
IOException
protected void writeArray2DimIntPrimitive(JsonWriter writer, int[][] array) throws IOException
IOException
protected void writeArray2DimLongPrimitive(JsonWriter writer, long[][] array) throws IOException
IOException
protected void writeArray2DimFloatPrimitive(JsonWriter writer, float[][] array) throws IOException
IOException
protected void writeArray2DimDoublePrimitive(JsonWriter writer, double[][] array) throws IOException
IOException
protected void writeArray2DimCharPrimitive(JsonWriter writer, char[][] array) throws IOException
IOException
protected void writeArrayString(JsonWriter writer, String[] array) throws IOException
IOException
protected void writeArrayCharacter(JsonWriter writer, Character[] array) throws IOException
IOException
protected void writeArrayLong(JsonWriter writer, Long[] array) throws IOException
IOException
protected void writeArrayInteger(JsonWriter writer, Integer[] array) throws IOException
IOException
protected void writeArrayShort(JsonWriter writer, Short[] array) throws IOException
IOException
protected void writeArrayDouble(JsonWriter writer, Double[] array) throws IOException
IOException
protected void writeArrayFloat(JsonWriter writer, Float[] array) throws IOException
IOException
protected void writeArrayByte(JsonWriter writer, Byte[] array) throws IOException
IOException
protected void writeArrayBoolean(JsonWriter writer, Boolean[] array) throws IOException
IOException
protected void writeArrayBigInteger(JsonWriter writer, BigInteger[] array) throws IOException
IOException
protected void writeArrayBigDecimal(JsonWriter writer, BigDecimal[] array) throws IOException
IOException
protected void writeArrayBooleanPrimitive(JsonWriter writer, boolean[] array) throws IOException
IOException
protected void writeArrayBytePrimitive(JsonWriter writer, byte[] array) throws IOException
IOException
protected void writeArrayShortPrimitive(JsonWriter writer, short[] array) throws IOException
IOException
protected void writeArrayIntPrimitive(JsonWriter writer, int[] array) throws IOException
IOException
protected void writeArrayLongPrimitive(JsonWriter writer, long[] array) throws IOException
IOException
protected void writeArrayFloatPrimitive(JsonWriter writer, float[] array) throws IOException
IOException
protected void writeArrayDoublePrimitive(JsonWriter writer, double[] array) throws IOException
IOException
protected void writeArrayCharPrimitive(JsonWriter writer, char[] array) throws IOException
IOException
protected void writeEnumArray(JsonWriter writer, Object[] array) throws IOException
IOException
protected void writeEnumArray2Dim(JsonWriter writer, Object[][] array) throws IOException
IOException
protected void writeJsonValue(JsonWriter writer, String name, Object jsonValue) throws IOException
IOException
protected void writeJsonMap(JsonWriter writer, Map<String,Object> map) throws IOException
IOException
protected void writeJsonArray(JsonWriter writer, String name, Object[] array) throws IOException
IOException
protected static void writeNested(JsonWriter writer, JsonEventObjectBase nested) throws IOException
IOException
protected static void writeNestedArray(JsonWriter writer, JsonEventObjectBase[] nesteds) throws IOException
IOException
Copyright © 2005–2019. All rights reserved.