public class EnvironmentEntryInitializingTreeMap<T> extends AbstractMap<String,T>
Map
implementation that initializes its entries by binding values from the
supplied environment. Any call to 'get()' will result in either returning the existing
value or initializing a new entry by binding properties with the specified prefix from
the environment.
This is strictly intended to be used for configuration property values and not to be
used as a general purpose map.
This implementation is not thread safe.AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
EnvironmentEntryInitializingTreeMap(org.springframework.core.env.ConfigurableEnvironment environment,
Class<T> entryClass,
String defaultsPrefix,
Map<String,T> delegate)
Constructs the map.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(Object key) |
Set<Map.Entry<String,T>> |
entrySet() |
T |
get(Object key) |
T |
put(String key,
T value) |
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, putAll, remove, size, toString, values
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public EnvironmentEntryInitializingTreeMap(org.springframework.core.env.ConfigurableEnvironment environment, Class<T> entryClass, String defaultsPrefix, Map<String,T> delegate)
environment
- the environment that supplies the default property valuesentryClass
- the entry classdefaultsPrefix
- the prefix for initializing the propertiesdelegate
- the actual map that stores the valuesCopyright © 2017 Pivotal Software, Inc.. All rights reserved.