public class OptionalProperty<T> extends Property<Optional<T>>
Wraps another property with an Optional: if a property is not present in the property resource,
Optional.empty() is returned.
| Constructor and Description |
|---|
OptionalProperty(Property<? extends T> baseProperty)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Property<? extends T> |
getBaseProperty()
Returns the underlying property used to retrieve the value of the optional.
|
protected Optional<T> |
getFromResource(PropertyResource resource) |
boolean |
isPresent(PropertyResource resource)
Returns whether or not the given resource contains the property.
|
getDefaultValue, getPath, getValue, toStringprotected Optional<T> getFromResource(PropertyResource resource)
getFromResource in class Property<Optional<T>>public boolean isPresent(PropertyResource resource)
PropertyCopyright © 2016–2018 The AuthMe Team. All rights reserved.