|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.bval.model.FeaturesCapable
public abstract class FeaturesCapable
Description: abstract superclass of meta objects that support a map of
features.
Constructor Summary | |
---|---|
FeaturesCapable()
Create a new FeaturesCapable instance. |
Method Summary | ||
---|---|---|
void |
addValidation(Validation validation)
Add a validation to this FeaturesCapable . |
|
|
copy()
Create a deep copy (copy receiver and copy properties). |
|
protected
|
copyInto(T target)
Copy this FeaturesCapable into another FeaturesCapable
instance. |
|
protected ConcurrentMap<String,Object> |
createFeaturesMap()
Create a features map for this FeaturesCapable object. |
|
|
getFeature(String key)
Get the specified feature. |
|
|
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. |
|
void |
optimizeRead(boolean fast)
Set whether to optimize read operations by accessing the features map in an unsynchronized manner. |
|
|
putFeature(String key,
T value)
Convenience method to set a particular feature value. |
|
void |
setValidations(Validation[] validations)
Set the validations for this FeaturesCapable . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FeaturesCapable()
Method Detail |
---|
public Map<String,Object> getFeatures()
public void optimizeRead(boolean fast)
fast
- 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)
T
- key
- value
- public <T extends FeaturesCapable> T copy()
T
-
protected <T extends FeaturesCapable> void copyInto(T target)
FeaturesCapable
into another FeaturesCapable
instance.
T
- 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |