Class MapConfigurationPropertySource
java.lang.Object
org.springframework.boot.context.properties.source.MapConfigurationPropertySource
- All Implemented Interfaces:
- Iterable<ConfigurationPropertyName>,- ConfigurationPropertySource,- IterableConfigurationPropertySource
public class MapConfigurationPropertySource
extends Object
implements IterableConfigurationPropertySource
A 
ConfigurationPropertySource backed by a Map and using standard name
 mapping rules.- Since:
- 2.0.0
- Author:
- Phillip Webb, Madhura Bhave
- 
Constructor SummaryConstructorsConstructorDescriptionCreate a new emptyMapConfigurationPropertySourceinstance.MapConfigurationPropertySource(Map<?, ?> map) Create a newMapConfigurationPropertySourceinstance with entries copies from the specified map.
- 
Method SummaryModifier and TypeMethodDescriptionReturn a singleConfigurationPropertyfrom the source ornullif no property can be found.Return the underlying source that is actually providing the properties.iterator()Return an iterator for thenamesmanaged by this source.voidAdd an individual entry.voidAdd all entries from the specified map.stream()Returns a sequentialStreamfor thenamesmanaged by this source.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliteratorMethods inherited from interface org.springframework.boot.context.properties.source.IterableConfigurationPropertySourcecontainsDescendantOf, filter, withAliases, withPrefix
- 
Constructor Details- 
MapConfigurationPropertySourcepublic MapConfigurationPropertySource()Create a new emptyMapConfigurationPropertySourceinstance.
- 
MapConfigurationPropertySourceCreate a newMapConfigurationPropertySourceinstance with entries copies from the specified map.- Parameters:
- map- the source map
 
 
- 
- 
Method Details- 
putAllAdd all entries from the specified map.- Parameters:
- map- the source map
 
- 
putAdd an individual entry.- Parameters:
- name- the name
- value- the value
 
- 
getUnderlyingSourceDescription copied from interface:ConfigurationPropertySourceReturn the underlying source that is actually providing the properties.- Specified by:
- getUnderlyingSourcein interface- ConfigurationPropertySource
- Returns:
- the underlying property source or null.
 
- 
getConfigurationPropertyDescription copied from interface:ConfigurationPropertySourceReturn a singleConfigurationPropertyfrom the source ornullif no property can be found.- Specified by:
- getConfigurationPropertyin interface- ConfigurationPropertySource
- Parameters:
- name- the name of the property (must not be- null)
- Returns:
- the associated object or null.
 
- 
iteratorDescription copied from interface:IterableConfigurationPropertySourceReturn an iterator for thenamesmanaged by this source.- Specified by:
- iteratorin interface- Iterable<ConfigurationPropertyName>
- Specified by:
- iteratorin interface- IterableConfigurationPropertySource
- Returns:
- an iterator (never null)
 
- 
streamDescription copied from interface:IterableConfigurationPropertySourceReturns a sequentialStreamfor thenamesmanaged by this source.- Specified by:
- streamin interface- IterableConfigurationPropertySource
- Returns:
- a stream of names (never null)
 
 
-