Class JsonEventObjectBase
java.lang.Object
com.espertech.esper.common.internal.event.json.core.JsonEventObjectBase
- All Implemented Interfaces:
JsonEventObject
,Map<String,
Object>
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract 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) entrySet()
Returns the dynamic property values (the non-predefined values)getNativeEntry
(int num) Returns the name-value pre-declared property including properties of the parent event type if anyabstract String
getNativeKey
(int num) Returns the pre-declared property name including properties names of the parent event type if anyabstract 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 anyabstract int
Returns the total number of pre-declared properties available including properties of the parent event type if anyabstract Object
getNativeValue
(int num) Returns the value of a pre-declared property including property values of the parent event type if anyboolean
isEmpty()
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 anyabstract void
nativeWrite
(JsonWriter writer) Write the pre-declared properties to the writervoid
putIfAbsent
(String key, Object value) boolean
boolean
void
replaceAll
(BiFunction<? super String, ? super Object, ?> function) int
size()
toString()
Returns the JSON string usingWriterConfig.MINIMAL
.toString
(WriterConfig config) Returns the JSON string given a writer configurationvalues()
void
write
(JsonWriter writer) void
writeTo
(Writer writer, WriterConfig config) Write JSON to the provided writer and using the provided configuration.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge
-
Field Details
-
EPTYPE
-
-
Constructor Details
-
JsonEventObjectBase
public JsonEventObjectBase()
-
-
Method Details
-
addJsonValue
Add a dynamic property value that the json parser encounters. Dynamic property values are not predefined and are catch-all in nature.- Parameters:
name
- namevalue
- value
-
getJsonValues
Returns the dynamic property values (the non-predefined values)- Returns:
- map
-
getNativeSize
public abstract int getNativeSize()Returns the total number of pre-declared properties available including properties of the parent event type if any- Returns:
- size
-
getNativeEntry
Returns the name-value pre-declared property including properties of the parent event type if any- Parameters:
num
- index number of the property- Returns:
- entry
- Throws:
NoSuchElementException
- for invalid index
-
getNativeKey
Returns the pre-declared property name including properties names of the parent event type if any- Parameters:
num
- index number of the property- Returns:
- name
- Throws:
NoSuchElementException
- for invalid index
-
getNativeValue
Returns the value of a pre-declared property including property values of the parent event type if any- Parameters:
num
- index number of the property- Returns:
- value
- Throws:
NoSuchElementException
- for invalid index
-
getNativeNum
Returns the index number of a a pre-declared property of the same name including property names of the parent event type if any- Parameters:
name
- property name- Returns:
- index starting at zero, ending at native-size minus 1; Returns -1 for non-existing property name
-
nativeContainsKey
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- Parameters:
key
- property name- Returns:
- flag
-
nativeWrite
Write the pre-declared properties to the writer- Parameters:
writer
- writer- Throws:
IOException
- for IO exceptions
-
writeTo
Description copied from interface:JsonEventObject
Write JSON to the provided writer and using the provided configuration.- Specified by:
writeTo
in interfaceJsonEventObject
- Parameters:
writer
- writerconfig
- JSON writer settings- Throws:
IOException
- when an IO exception occurs
-
write
- Throws:
IOException
-
size
public int size() -
entrySet
-
isEmpty
public boolean isEmpty() -
keySet
-
containsKey
- Specified by:
containsKey
in interfaceMap<String,
Object>
-
get
-
containsValue
- Specified by:
containsValue
in interfaceMap<String,
Object>
-
values
-
put
-
remove
-
putAll
-
clear
public void clear() -
remove
-
replaceAll
- Specified by:
replaceAll
in interfaceMap<String,
Object>
-
putIfAbsent
- Specified by:
putIfAbsent
in interfaceMap<String,
Object>
-
replace
-
replace
-
toString
Description copied from interface:JsonEventObject
Returns the JSON string given a writer configuration- Specified by:
toString
in interfaceJsonEventObject
- Parameters:
config
- JSON writer settings- Returns:
- JSON
-
toString
Description copied from interface:JsonEventObject
Returns the JSON string usingWriterConfig.MINIMAL
.- Specified by:
toString
in interfaceJsonEventObject
- Overrides:
toString
in classObject
- Returns:
- JSON
-