类 MapConfigurationPropertySource
- java.lang.Object
- org.springframework.boot.context.properties.source.MapConfigurationPropertySource
- 所有已实现的接口:
Iterable<ConfigurationPropertyName>
,ConfigurationPropertySource
,IterableConfigurationPropertySource
public class MapConfigurationPropertySource extends Object implements IterableConfigurationPropertySource
AnConfigurationPropertySource
backed by aMap
and using standard name mapping rules.
构造器概要
构造器 构造器 说明 MapConfigurationPropertySource()
Create a new emptyMapConfigurationPropertySource
instance.MapConfigurationPropertySource(Map<?,?> map)
Create a newMapConfigurationPropertySource
instance with entries copies from the specified map.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 ConfigurationProperty
getConfigurationProperty(ConfigurationPropertyName name)
Return a singleConfigurationProperty
from the source ornull
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 thenames
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 sequentialStream
for thenames
managed by this source.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 java.lang.Iterable
forEach, spliterator
从接口继承的方法 org.springframework.boot.context.properties.source.IterableConfigurationPropertySource
containsDescendantOf, filter, withAliases
构造器详细资料
MapConfigurationPropertySource
public MapConfigurationPropertySource()
Create a new emptyMapConfigurationPropertySource
instance.
MapConfigurationPropertySource
public MapConfigurationPropertySource(Map<?,?> map)
Create a newMapConfigurationPropertySource
instance with entries copies from the specified map.- 参数:
map
- the source map
方法详细资料
putAll
public void putAll(Map<?,?> map)
Add all entries from the specified map.- 参数:
map
- the source map
put
public void put(Object name, Object value)
Add an individual entry.- 参数:
name
- the namevalue
- the value
getUnderlyingSource
public Object getUnderlyingSource()
从接口复制的说明:ConfigurationPropertySource
Return the underlying source that is actually providing the properties.- 指定者:
getUnderlyingSource
在接口中ConfigurationPropertySource
- 返回:
- the underlying property source or
null
.
getConfigurationProperty
public ConfigurationProperty getConfigurationProperty(ConfigurationPropertyName name)
从接口复制的说明:ConfigurationPropertySource
Return a singleConfigurationProperty
from the source ornull
if no property can be found.- 指定者:
getConfigurationProperty
在接口中ConfigurationPropertySource
- 参数:
name
- the name of the property (must not benull
)- 返回:
- the associated object or
null
.
iterator
public Iterator<ConfigurationPropertyName> iterator()
从接口复制的说明:IterableConfigurationPropertySource
Return an iterator for thenames
managed by this source.- 指定者:
iterator
在接口中Iterable<ConfigurationPropertyName>
- 指定者:
iterator
在接口中IterableConfigurationPropertySource
- 返回:
- an iterator (never
null
)
stream
public Stream<ConfigurationPropertyName> stream()
从接口复制的说明:IterableConfigurationPropertySource
Returns a sequentialStream
for thenames
managed by this source.- 指定者:
stream
在接口中IterableConfigurationPropertySource
- 返回:
- a stream of names (never
null
)