|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.spi.core.constraint.AbstractPropertyConstraint<T> de.smartics.properties.spi.core.constraints.PropertyRangeConstraint<T>
T
- the type of the property value.
public final class PropertyRangeConstraint<T>
Constraint that requires values to be part of an enumeration.
Constructor Summary | |
---|---|
PropertyRangeConstraint(PropertyValueRange<T> valueRange) Default constructor. |
Method Summary | |
---|---|
String |
getDescription(Locale locale) Returns a localized description of the defined constraints. |
PropertyValueRange<T> |
getValueRange() Returns the list of valid properties. |
boolean |
isValid(T value) Checks if the given value is valid. |
Methods inherited from class de.smartics.properties.spi.core.constraint.AbstractPropertyConstraint |
---|
getDescription, isMandatoryConstraint, toString, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PropertyRangeConstraint(PropertyValueRange<T> valueRange)
valueRange
- the list of valid properties.
Method Detail |
---|
public PropertyValueRange<T> getValueRange()
A value of null
tells that there is no range defined.
public String getDescription(Locale locale)
PropertyConstraint
locale
- the locale to use to fetch a localized description.
public boolean isValid(T value)
PropertyConstraint
value
- the value to be checked.
true
if the
value
is valid,
false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |