public class MapConfigurationPropertySource extends Object implements IterableConfigurationPropertySource
ConfigurationPropertySource
backed by a Map
and using standard name
mapping rules.Constructor and Description |
---|
MapConfigurationPropertySource()
Create a new empty
MapConfigurationPropertySource instance. |
MapConfigurationPropertySource(Map<?,?> map)
Create a new
MapConfigurationPropertySource instance with entries copies
from the specified map. |
Modifier and Type | Method and Description |
---|---|
ConfigurationProperty |
getConfigurationProperty(ConfigurationPropertyName name)
Return a single
ConfigurationProperty from the source or null if no
property can be found. |
Object |
getUnderlyingSource()
Return the underlying source that is actually providing the properties.
|
Iterator<ConfigurationPropertyName> |
iterator()
Return an iterator for the
names managed by this
source. |
void |
put(Object name,
Object value)
Add an individual entry.
|
void |
putAll(Map<?,?> map)
Add all entries from the specified map.
|
Stream<ConfigurationPropertyName> |
stream()
Returns a sequential
Stream for the names
managed by this source. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
containsDescendantOf, filter, withAliases, withPrefix
from
forEach, spliterator
public MapConfigurationPropertySource()
MapConfigurationPropertySource
instance.public MapConfigurationPropertySource(Map<?,?> map)
MapConfigurationPropertySource
instance with entries copies
from the specified map.map
- the source mappublic void putAll(Map<?,?> map)
map
- the source mappublic void put(Object name, Object value)
name
- the namevalue
- the valuepublic Object getUnderlyingSource()
ConfigurationPropertySource
getUnderlyingSource
in interface ConfigurationPropertySource
null
.public ConfigurationProperty getConfigurationProperty(ConfigurationPropertyName name)
ConfigurationPropertySource
ConfigurationProperty
from the source or null
if no
property can be found.getConfigurationProperty
in interface ConfigurationPropertySource
name
- the name of the property (must not be null
)null
.public Iterator<ConfigurationPropertyName> iterator()
IterableConfigurationPropertySource
names
managed by this
source.iterator
in interface Iterable<ConfigurationPropertyName>
iterator
in interface IterableConfigurationPropertySource
null
)public Stream<ConfigurationPropertyName> stream()
IterableConfigurationPropertySource
Stream
for the names
managed by this source.stream
in interface IterableConfigurationPropertySource
null
)