Interface IterableConfigurationPropertySource
- All Superinterfaces:
ConfigurationPropertySource
,Iterable<ConfigurationPropertyName>
- All Known Implementing Classes:
MapConfigurationPropertySource
public interface IterableConfigurationPropertySource extends ConfigurationPropertySource, Iterable<ConfigurationPropertyName>
AConfigurationPropertySource
with a fullyIterable
set of entries. Implementations of this interface must be able to iterate over all contained configuration properties. Anynon-null
result fromConfigurationPropertySource.getConfigurationProperty(ConfigurationPropertyName)
must also have an equivalent entry in theiterator
.
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ConfigurationPropertyState
containsDescendantOf(ConfigurationPropertyName name)
Returns if the source contains any descendants of the specified name.default IterableConfigurationPropertySource
filter(Predicate<ConfigurationPropertyName> filter)
Return a filtered variant of this source, containing only names that match the givenPredicate
.default Iterator<ConfigurationPropertyName>
iterator()
Return an iterator for thenames
managed by this source.Stream<ConfigurationPropertyName>
stream()
Returns a sequentialStream
for thenames
managed by this source.default IterableConfigurationPropertySource
withAliases(ConfigurationPropertyNameAliases aliases)
Return a variant of this source that supports name aliases.Methods inherited from interface org.springframework.boot.context.properties.source.ConfigurationPropertySource
getConfigurationProperty, getUnderlyingSource
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Method Detail
iterator
default Iterator<ConfigurationPropertyName> iterator()
Return an iterator for thenames
managed by this source.- Specified by:
iterator
in interfaceIterable<ConfigurationPropertyName>
- Returns:
- an iterator (never
null
)
stream
Stream<ConfigurationPropertyName> stream()
Returns a sequentialStream
for thenames
managed by this source.- Returns:
- a stream of names (never
null
)
containsDescendantOf
default ConfigurationPropertyState containsDescendantOf(ConfigurationPropertyName name)
Description copied from interface:ConfigurationPropertySource
Returns if the source contains any descendants of the specified name. May returnConfigurationPropertyState.PRESENT
orConfigurationPropertyState.ABSENT
if an answer can be determined orConfigurationPropertyState.UNKNOWN
if it's not possible to determine a definitive answer.- Specified by:
containsDescendantOf
in interfaceConfigurationPropertySource
- Parameters:
name
- the name to check- Returns:
- if the source contains any descendants
filter
default IterableConfigurationPropertySource filter(Predicate<ConfigurationPropertyName> filter)
Description copied from interface:ConfigurationPropertySource
Return a filtered variant of this source, containing only names that match the givenPredicate
.- Specified by:
filter
in interfaceConfigurationPropertySource
- Parameters:
filter
- the filter to match- Returns:
- a filtered
ConfigurationPropertySource
instance
withAliases
default IterableConfigurationPropertySource withAliases(ConfigurationPropertyNameAliases aliases)
Description copied from interface:ConfigurationPropertySource
Return a variant of this source that supports name aliases.- Specified by:
withAliases
in interfaceConfigurationPropertySource
- Parameters:
aliases
- a function that returns a stream of aliases for any given name- Returns:
- a
ConfigurationPropertySource
instance supporting name aliases