T
- The generic property typepublic interface Property<T> extends NamedResource
Modifier and Type | Interface and Description |
---|---|
static class |
Property.BaseProperty<T> |
static class |
Property.BooleanProperty |
static class |
Property.CharsetProperty |
static class |
Property.DurationInSecondsProperty |
static class |
Property.DurationProperty |
static class |
Property.EnumProperty<T extends Enum<T>> |
static class |
Property.IntegerProperty |
static class |
Property.LongProperty |
static class |
Property.ObjectProperty |
static class |
Property.StringProperty |
static class |
Property.Validating<T> |
BY_NAME_COMPARATOR, NAME_EXTRACTOR
findByName, findFirstMatchByName, getName, getNameList, getNames, ofName, removeByName, safeCompareByName
Class<T> getType()
default T getRequiredDefault()
Optional<T> get(PropertyResolver resolver)
resolver
- The PropertyResolver
to query for the property value.Optional
result - if resolver contains a value then the resolver's value, otherwise
the pre-defined default
default T getRequired(PropertyResolver resolver)
resolver
- The PropertyResolver
to query for the property value.NoSuchElementException
- if resolver contains no value and no getDefault()
defineddefault T getOrNull(PropertyResolver resolver)
resolver
- The PropertyResolver
to query for the property value.null
if no specific value found in the resolver - regardless of
whether there is a default valueT getOrCustomDefault(PropertyResolver resolver, T defaultValue)
resolver
- The PropertyResolver
to query for the property value.defaultValue
- The default value to return if no specific value found in resolvervoid set(PropertyResolver resolver, T value)
resolver
- The PropertyResolver
to update with the property value.value
- The value to setdefault void remove(PropertyResolver resolver)
resolver
- The PropertyResolver
to remove the property fromCopyright © 2008–2024 The Apache Software Foundation. All rights reserved.