Interface SettingSource
- All Known Subinterfaces:
FunctionalSource,SettingStore
- All Known Implementing Classes:
FunctionalStore,MapStore
public interface SettingSource
Interface for pluggable property sources used by
Settings.
A setting source provides a way to retrieve property values. Sources are checked in reverse order (last added is checked first) when looking up properties.
For writable sources that support modifying property values, see SettingStore.
Return Value Semantics:
null - The setting does not exist in this source. The lookup will continue to the next source.Optional.empty() - The setting exists but has an explicitly null value. This will be returned immediately, overriding any values from lower-priority sources.Optional.of(value) - The setting exists and has a non-null value. This will be returned immediately.
Examples:
-
Method Summary
-
Method Details
-
get
Returns a setting in this setting source.Return value semantics:
null - The setting does not exist in this source. The lookup will continue to the next source.Optional.empty() - The setting exists but has an explicitly null value. This will be returned immediately, overriding any values from lower-priority sources.Optional.of(value) - The setting exists and has a non-null value. This will be returned immediately.
- Parameters:
name- The property name.- Returns:
- The property value,
null if the property doesn't exist in this source, orOptional.empty() if the property exists but has a null value.
-