Class JdkMapAdapterStringMap
java.lang.Object
org.apache.logging.log4j.core.impl.JdkMapAdapterStringMap
- All Implemented Interfaces:
Serializable,ReadOnlyStringMap,StringMap
Provides a read-only
StringMap view of a Map<String, String>.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.for performance reasons since 2.23.JdkMapAdapterStringMap(Map<String, String> map, boolean frozen) Constructs a newStringMap, based on a JDK map. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(String key) boolean<V> voidforEach(BiConsumer<String, ? super V> action) <V,S> void forEach(TriConsumer<String, ? super V, S> action, S state) voidfreeze()<V> VinthashCode()booleanisEmpty()booleanisFrozen()voidputAll(ReadOnlyStringMap source) voidvoidintsize()toMap()toString()
-
Constructor Details
-
JdkMapAdapterStringMap
public JdkMapAdapterStringMap() -
JdkMapAdapterStringMap
Deprecated.for performance reasons since 2.23. UseJdkMapAdapterStringMap(Map, boolean)instead. -
JdkMapAdapterStringMap
Constructs a newStringMap, based on a JDK map.The underlying map should not be modified after this call.
If the
Mapimplementation does not allow modifications,frozenshould be set totrue.- Parameters:
map- a JDK map,frozen- iftruethis collection will be immutable.
-
-
Method Details
-
toMap
- Specified by:
toMapin interfaceReadOnlyStringMap
-
containsKey
- Specified by:
containsKeyin interfaceReadOnlyStringMap
-
forEach
- Specified by:
forEachin interfaceReadOnlyStringMap
-
forEach
- Specified by:
forEachin interfaceReadOnlyStringMap
-
getValue
- Specified by:
getValuein interfaceReadOnlyStringMap
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceReadOnlyStringMap
-
size
public int size()- Specified by:
sizein interfaceReadOnlyStringMap
-
clear
public void clear() -
freeze
public void freeze() -
isFrozen
public boolean isFrozen() -
putAll
-
putValue
-
remove
-
toString
-
equals
-
hashCode
public int hashCode()
-