protected static class EnvironmentMapAdapter.EnvironmentEntry
extends java.lang.Object
implements java.util.Map.Entry<java.lang.String,java.lang.String>
EnvironmentMapAdapter.EnvironmentEntry
is a Map.Entry
implementation mapping an Environment
property (key)
to its value.Map.Entry
,
Environment
Constructor and Description |
---|
EnvironmentEntry(org.springframework.core.env.Environment environment,
java.lang.String key)
Constructs a new instance of
EnvironmentMapAdapter.EnvironmentEntry initialized with the given Environment
and key (property). |
Modifier and Type | Method and Description |
---|---|
protected org.springframework.core.env.Environment |
getEnvironment()
Returns the configured
Environment to which this Map.Entry belongs. |
java.lang.String |
getKey()
Gets the
key (property) of this Map.Entry . |
java.lang.String |
getValue()
|
java.lang.String |
setValue(java.lang.String value) |
public EnvironmentEntry(@NonNull org.springframework.core.env.Environment environment, @NonNull java.lang.String key)
EnvironmentMapAdapter.EnvironmentEntry
initialized with the given Environment
and key
(property).environment
- Environment
to which the key
belongs; must not be null.key
- String
referring to the property from the Environment
; must not be null.java.lang.IllegalArgumentException
- if the Environment
or the key
is null.Environment
@NonNull protected org.springframework.core.env.Environment getEnvironment()
Environment
to which this Map.Entry
belongs.Environment
; never null.Environment
@NonNull public java.lang.String getKey()
key
(property) of this Map.Entry
.getKey
in interface java.util.Map.Entry<java.lang.String,java.lang.String>
key
(property) of this Map.Entry
.@Nullable public java.lang.String getValue()
getValue
in interface java.util.Map.Entry<java.lang.String,java.lang.String>
value
mapped to the key
(property) in this Map.Entry
(Environment
).PropertyResolver.getProperty(String)
,
getEnvironment()
,
getKey()
public java.lang.String setValue(java.lang.String value)
setValue
in interface java.util.Map.Entry<java.lang.String,java.lang.String>
java.lang.UnsupportedOperationException