public interface ConfigValueAtContainer<TContainer,TValue>
Modifier and Type | Method and Description |
---|---|
Maybe<? extends TValue> |
asMaybe()
Absent if no value can be found, typically meaning no default value, but in raw value lookups it may ignore default values.
|
TValue |
get()
Returns the value for this key, or null.
|
TContainer |
getContainer()
The container where the value was found (possibly an ancestor of the queried object).
|
Maybe<TValue> |
getDefaultValue()
The default value on the key, if available and permitted,
possibly coerced or resolved in the scope of
getContainer() ,
and possibly absent e.g. |
ConfigKey<? extends TValue> |
getKey()
The key whose value is being held here.
|
boolean |
isValueExplicitlySet()
If false, any contents of
get() will have come from getDefaultValue() . |
@Nullable TValue get()
asMaybe()
or null.@Nonnull Maybe<? extends TValue> asMaybe()
boolean isValueExplicitlySet()
get()
will have come from getDefaultValue()
.@Nullable TContainer getContainer()
@Nullable ConfigKey<? extends TValue> getKey()
This may be null when working in a context where the query key is widely known to indicate that no key was defined at this container.
@Nonnull Maybe<TValue> getDefaultValue()
getContainer()
,
and possibly absent e.g. in raw value lookups