public abstract class FeaturesCapable extends Object implements Serializable
Constructor and Description |
---|
FeaturesCapable()
Create a new FeaturesCapable instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addValidation(Validation validation)
Add a validation to this
FeaturesCapable . |
<T extends FeaturesCapable> |
copy()
Create a deep copy (copy receiver and copy properties).
|
protected void |
copyInto(FeaturesCapable target)
Copy this
FeaturesCapable into another FeaturesCapable
instance. |
protected ConcurrentMap<String,Object> |
createFeaturesMap()
Create a features map for this
FeaturesCapable object. |
<T> T |
getFeature(String key)
Get the specified feature.
|
<T> T |
getFeature(String key,
T defaultValue)
Get the specified feature, returning
defaultValue if
undeclared. |
Map<String,Object> |
getFeatures()
Get the (live) map of features.
|
Validation[] |
getValidations()
Get any validations set for this
FeaturesCapable . |
boolean |
hasValidation(Validation aValidation)
Search for an equivalent validation among those configured.
|
<T> T |
initFeature(String key,
T value) |
<T> void |
putFeature(String key,
T value)
Convenience method to set a particular feature value.
|
void |
setValidations(Validation[] validations)
Set the validations for this
FeaturesCapable . |
public <T> T getFeature(String key)
T
- key
- public <T> T getFeature(String key, T defaultValue)
defaultValue
if
undeclared.T
- key
- defaultValue
- public <T> void putFeature(String key, T value)
key
- value
- public <T> T initFeature(String key, T value)
public <T extends FeaturesCapable> T copy()
T
- protected void copyInto(FeaturesCapable target)
FeaturesCapable
into another FeaturesCapable
instance.target
- public Validation[] getValidations()
FeaturesCapable
.public void setValidations(Validation[] validations)
FeaturesCapable
.validations
- public void addValidation(Validation validation)
FeaturesCapable
.validation
- to addpublic boolean hasValidation(Validation aValidation)
aValidation
- protected ConcurrentMap<String,Object> createFeaturesMap()
FeaturesCapable
object.Copyright © 2010–2023 The Apache Software Foundation. All rights reserved.