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
ConstructorDescriptionDeprecated.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 TypeMethodDescriptionvoid
clear()
boolean
containsKey
(String key) boolean
<V> void
forEach
(BiConsumer<String, ? super V> action) <V,
S> void forEach
(TriConsumer<String, ? super V, S> action, S state) void
freeze()
<V> V
int
hashCode()
boolean
isEmpty()
boolean
isFrozen()
void
putAll
(ReadOnlyStringMap source) void
void
int
size()
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
Map
implementation does not allow modifications,frozen
should be set totrue
.- Parameters:
map
- a JDK map,frozen
- iftrue
this collection will be immutable.
-
-
Method Details
-
toMap
- Specified by:
toMap
in interfaceReadOnlyStringMap
-
containsKey
- Specified by:
containsKey
in interfaceReadOnlyStringMap
-
forEach
- Specified by:
forEach
in interfaceReadOnlyStringMap
-
forEach
- Specified by:
forEach
in interfaceReadOnlyStringMap
-
getValue
- Specified by:
getValue
in interfaceReadOnlyStringMap
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceReadOnlyStringMap
-
size
public int size()- Specified by:
size
in interfaceReadOnlyStringMap
-
clear
public void clear() -
freeze
public void freeze() -
isFrozen
public boolean isFrozen() -
putAll
-
putValue
-
remove
-
toString
-
equals
-
hashCode
public int hashCode()
-