Spring Boot for VMware GemFire
Class EnvironmentMapAdapter
- Since:
- 1.3.1
- See Also:
-
MapAbstractMapEnvironmentPropertySource- Adapter Software Design Pattern
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classEnvironmentMapAdapter.EnvironmentEntryis aMap.Entryimplementation mapping anEnvironmentproperty (key) to its value.Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionEnvironmentMapAdapter(org.springframework.core.env.Environment environment) Constructs a new instance ofEnvironmentMapAdapterinitialized with the givenEnvironment. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(Object key) Null-safe method determining whether the givenkeyis a property in the underlyingEnvironment.entrySet()static EnvironmentMapAdapterfrom(org.springframework.core.env.Environment environment) Factory method used to construct an new instance ofEnvironmentMapAdapterinitialized with the givenEnvironment.protected org.springframework.core.env.EnvironmentGets the configuredEnvironmentobject being adapted by thisMap.Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
EnvironmentMapAdapter
public EnvironmentMapAdapter(@NonNull org.springframework.core.env.Environment environment) Constructs a new instance ofEnvironmentMapAdapterinitialized with the givenEnvironment.- Parameters:
environment-Environmentto adapt; must not be null.- Throws:
IllegalArgumentException- ifEnvironmentis null.- See Also:
-
Environment
-
-
Method Details
-
from
public static EnvironmentMapAdapter from(@NonNull org.springframework.core.env.Environment environment) Factory method used to construct an new instance ofEnvironmentMapAdapterinitialized with the givenEnvironment.- Parameters:
environment-Environmentto adapt; must not be null.- Returns:
- a new instance of
EnvironmentMapAdapterfor the givenEnvironment. - Throws:
IllegalArgumentException- ifEnvironmentis null.- See Also:
-
EnvironmentEnvironmentMapAdapter(Environment)
-
getEnvironment
@NonNull protected org.springframework.core.env.Environment getEnvironment()Gets the configuredEnvironmentobject being adapted by thisMap.- Returns:
- the configured
Environment; never null. - See Also:
-
Environment
-
containsKey
Null-safe method determining whether the givenkeyis a property in the underlyingEnvironment.- Specified by:
containsKeyin interfaceMap<String,String> - Overrides:
containsKeyin classAbstractMap<String,String> - Returns:
- a boolean value indicating whether the given
keyis a property in the underlyingEnvironment. - See Also:
-
PropertyResolver.containsProperty(String)getEnvironment()
-
get
- Specified by:
getin interfaceMap<String,String> - Overrides:
getin classAbstractMap<String,String> - Parameters:
key-keyidentifying the property whose value will be retrieved from theEnvironment.- Returns:
- the
valueof the property identified by the givenMapkeyfrom theEnvironment. - See Also:
-
PropertyResolver.getProperty(String)getEnvironment()
-
entrySet
-