Interface FunctionalPropertySource
- All Superinterfaces:
PropertySource
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface for creating read-only
PropertySource instances from a function.-
Method Summary
Modifier and TypeMethodDescriptionReturns a property in this property source.static FunctionalPropertySourceof(UnaryOperator<String> function) Creates a functional source from a function that returns a string.
-
Method Details
-
get
Description copied from interface:PropertySourceReturns a property in this property source.- Specified by:
getin interfacePropertySource- Parameters:
name- The property name.- Returns:
- The property lookup result:
PropertyLookupResult.missing()if this source does not define the key.PropertyLookupResult.present(Optional)withOptional.empty()if the key exists with a null value.PropertyLookupResult.present(Optional)with a value if the key exists with a non-null value.
-
of
Creates a functional source from a function that returns a string.- Parameters:
function- The function to delegate property lookups to. Must not benull .- Returns:
- A new functional property source instance.
-