public class MapConfigurationPropertySource extends java.lang.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(java.util.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. |
java.lang.Object |
getUnderlyingSource()
Return the underlying source that is actually providing the properties.
|
java.util.Iterator<ConfigurationPropertyName> |
iterator()
Return an iterator for the
names managed by this
source. |
void |
put(java.lang.Object name,
java.lang.Object value)
Add an individual entry.
|
void |
putAll(java.util.Map<?,?> map)
Add all entries from the specified map.
|
java.util.stream.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
public MapConfigurationPropertySource()
MapConfigurationPropertySource
instance.public MapConfigurationPropertySource(java.util.Map<?,?> map)
MapConfigurationPropertySource
instance with entries copies
from the specified map.map
- the source mappublic void putAll(java.util.Map<?,?> map)
map
- the source mappublic void put(java.lang.Object name, java.lang.Object value)
name
- the namevalue
- the valuepublic java.lang.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 java.util.Iterator<ConfigurationPropertyName> iterator()
IterableConfigurationPropertySource
names
managed by this
source.iterator
in interface java.lang.Iterable<ConfigurationPropertyName>
iterator
in interface IterableConfigurationPropertySource
null
)public java.util.stream.Stream<ConfigurationPropertyName> stream()
IterableConfigurationPropertySource
Stream
for the names
managed by this source.stream
in interface IterableConfigurationPropertySource
null
)