private static class LogEventWrapper.ContextDataMap extends java.util.HashMap<java.lang.String,java.lang.String> implements ReadOnlyStringMap
| Constructor and Description |
|---|
ContextDataMap(java.util.Map<java.lang.String,java.lang.String> map) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(java.lang.String key)
Returns
true if this data structure contains the specified key, false otherwise. |
<V> void |
forEach(BiConsumer<java.lang.String,? super V> action)
Performs the given action for each key-value pair in this data structure
until all entries have been processed or the action throws an exception.
|
<V,S> void |
forEach(TriConsumer<java.lang.String,? super V,S> action,
S state)
Performs the given action for each key-value pair in this data structure
until all entries have been processed or the action throws an exception.
|
<V> V |
getValue(java.lang.String key)
Returns the value for the specified key, or
null if the specified key does not exist in this collection. |
java.util.Map<java.lang.String,java.lang.String> |
toMap()
Returns a non-
null mutable Map<String, String> containing a snapshot of this data structure. |
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitisEmpty, sizeContextDataMap(java.util.Map<java.lang.String,java.lang.String> map)
public java.util.Map<java.lang.String,java.lang.String> toMap()
ReadOnlyStringMapnull mutable Map<String, String> containing a snapshot of this data structure.toMap in interface ReadOnlyStringMapMap<String, String> form.public boolean containsKey(java.lang.String key)
ReadOnlyStringMaptrue if this data structure contains the specified key, false otherwise.containsKey in interface ReadOnlyStringMapkey - the key whose presence to check. May be null.true if this data structure contains the specified key, false otherwise.public <V> void forEach(BiConsumer<java.lang.String,? super V> action)
ReadOnlyStringMap
Some implementations may not support structural modifications (adding new elements or removing elements) while
iterating over the contents. In such implementations, attempts to add or remove elements from the
BiConsumer's BiConsumer.accept(Object, Object) accept} method may cause a
ConcurrentModificationException to be thrown.
forEach in interface ReadOnlyStringMapV - type of the value.action - The action to be performed for each key-value pair in this collection.public <V,S> void forEach(TriConsumer<java.lang.String,? super V,S> action, S state)
ReadOnlyStringMapThe third parameter lets callers pass in a stateful object to be modified with the key-value pairs, so the TriConsumer implementation itself can be stateless and potentially reusable.
Some implementations may not support structural modifications (adding new elements or removing elements) while
iterating over the contents. In such implementations, attempts to add or remove elements from the
TriConsumer's accept method may cause a
ConcurrentModificationException to be thrown.
forEach in interface ReadOnlyStringMapV - type of the value.S - type of the third parameter.action - The action to be performed for each key-value pair in this collection.state - the object to be passed as the third parameter to each invocation on the specified
triconsumer.public <V> V getValue(java.lang.String key)
ReadOnlyStringMapnull if the specified key does not exist in this collection.getValue in interface ReadOnlyStringMapkey - the key whose value to return.null.