public interface IterableConfigurationPropertySource extends ConfigurationPropertySource, java.lang.Iterable<ConfigurationPropertyName>
ConfigurationPropertySource
with a fully Iterable
set of entries.
Implementations of this interface must be able to iterate over all
contained configuration properties. Any non-null
result from
ConfigurationPropertySource.getConfigurationProperty(ConfigurationPropertyName)
must also have an
equivalent entry in the iterator
.Modifier and Type | Method and Description |
---|---|
default ConfigurationPropertyState |
containsDescendantOf(ConfigurationPropertyName name)
Returns if the source contains any descendants of the specified name.
|
default IterableConfigurationPropertySource |
filter(java.util.function.Predicate<ConfigurationPropertyName> filter)
Return a filtered variant of this source, containing only names that match the
given
Predicate . |
default java.util.Iterator<ConfigurationPropertyName> |
iterator()
Return an iterator for the
names managed by this
source. |
java.util.stream.Stream<ConfigurationPropertyName> |
stream()
Returns a sequential
Stream for the names
managed by this source. |
default IterableConfigurationPropertySource |
withAliases(ConfigurationPropertyNameAliases aliases)
Return a variant of this source that supports name aliases.
|
getConfigurationProperty, getUnderlyingSource
default java.util.Iterator<ConfigurationPropertyName> iterator()
names
managed by this
source.iterator
in interface java.lang.Iterable<ConfigurationPropertyName>
null
)java.util.stream.Stream<ConfigurationPropertyName> stream()
Stream
for the names
managed by this source.null
)default ConfigurationPropertyState containsDescendantOf(ConfigurationPropertyName name)
ConfigurationPropertySource
ConfigurationPropertyState.PRESENT
or
ConfigurationPropertyState.ABSENT
if an answer can be determined or
ConfigurationPropertyState.UNKNOWN
if it's not possible to determine a
definitive answer.containsDescendantOf
in interface ConfigurationPropertySource
name
- the name to checkdefault IterableConfigurationPropertySource filter(java.util.function.Predicate<ConfigurationPropertyName> filter)
ConfigurationPropertySource
Predicate
.filter
in interface ConfigurationPropertySource
filter
- the filter to matchConfigurationPropertySource
instancedefault IterableConfigurationPropertySource withAliases(ConfigurationPropertyNameAliases aliases)
ConfigurationPropertySource
withAliases
in interface ConfigurationPropertySource
aliases
- a function that returns a stream of aliases for any given nameConfigurationPropertySource
instance supporting name aliases