Package org.apache.logging.log4j.util
Interface StringMap
- 
- All Superinterfaces:
- ReadOnlyStringMap,- Serializable
 - All Known Subinterfaces:
- IndexedStringMap
 - All Known Implementing Classes:
- SortedArrayStringMap
 
 public interface StringMap extends ReadOnlyStringMap Exposes methods to add and remove key-value pairs to and fromReadOnlyStringMap.- Since:
- 2.7
- See Also:
- ReadOnlyStringMap
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Removes all key-value pairs from this collection.booleanequals(Object obj)Indicates whether some other object is "equal to" this one.voidfreeze()Makes this collection immutable.inthashCode()Returns a hash code value for the object.booleanisFrozen()voidputAll(ReadOnlyStringMap source)Copies all key-value pairs from the specifiedReadOnlyStringMapinto thisStringMap.voidputValue(String key, Object value)Puts the specified key-value pair into the collection.voidremove(String key)Removes the key-value pair for the specified key from this data structure.- 
Methods inherited from interface org.apache.logging.log4j.util.ReadOnlyStringMapcontainsKey, forEach, forEach, getValue, isEmpty, size, toMap
 
- 
 
- 
- 
- 
Method Detail- 
clearvoid clear() Removes all key-value pairs from this collection.- Throws:
- ConcurrentModificationException- some implementations may not support structural modifications to this data structure while iterating over the contents with- ReadOnlyStringMap.forEach(BiConsumer)or- ReadOnlyStringMap.forEach(TriConsumer, Object).
- UnsupportedOperationException- if this collection has been frozen.
 
 - 
equalsboolean equals(Object obj) Indicates whether some other object is "equal to" this one.- Overrides:
- equalsin class- Object
- Parameters:
- obj- the reference object with which to compare.
- Returns:
- trueif this object is the same as the obj argument;- falseotherwise.
- See Also:
- hashCode()
 
 - 
freezevoid freeze() Makes this collection immutable. Attempts to modify the collection after thefreeze()method was called will result in anUnsupportedOperationExceptionbeing thrown.
 - 
hashCodeint hashCode() Returns a hash code value for the object.
 - 
isFrozenboolean isFrozen() - Returns:
- trueif this object has been frozen,- falseotherwise
 
 - 
putAllvoid putAll(ReadOnlyStringMap source) Copies all key-value pairs from the specifiedReadOnlyStringMapinto thisStringMap.- Parameters:
- source- the- ReadOnlyStringMapto copy key-value pairs from
- Throws:
- ConcurrentModificationException- some implementations may not support structural modifications to this data structure while iterating over the contents with- ReadOnlyStringMap.forEach(BiConsumer)or- ReadOnlyStringMap.forEach(TriConsumer, Object).
- UnsupportedOperationException- if this collection has been frozen.
 
 - 
putValuevoid putValue(String key, Object value) Puts the specified key-value pair into the collection.- Parameters:
- key- the key to add or remove. Keys may be- null.
- value- the value to add. Values may be- null.
- Throws:
- ConcurrentModificationException- some implementations may not support structural modifications to this data structure while iterating over the contents with- ReadOnlyStringMap.forEach(BiConsumer)or- ReadOnlyStringMap.forEach(TriConsumer, Object).
- UnsupportedOperationException- if this collection has been frozen.
 
 - 
removevoid remove(String key) Removes the key-value pair for the specified key from this data structure.- Parameters:
- key- the key to remove. May be- null.
- Throws:
- ConcurrentModificationException- some implementations may not support structural modifications to this data structure while iterating over the contents with- ReadOnlyStringMap.forEach(BiConsumer)or- ReadOnlyStringMap.forEach(TriConsumer, Object).
- UnsupportedOperationException- if this collection has been frozen.
 
 
- 
 
-