T
- the type of value to be constrained.public class ValueConstraint<T> extends AbstractPropertyConstraint implements Constraint
ComparisonType
and a value.Constructor and Description |
---|
ValueConstraint(java.lang.String name,
T value)
Creates a new instance of ValueConstraint with the given property name and value.
|
ValueConstraint(java.lang.String name,
T value,
ComparisonType comparison)
Creates a new instance of ValueConstraint with the given property name, value and comparison type.
|
ValueConstraint(java.lang.String name,
T value,
ComparisonType comparison,
Operator operator)
Creates a new instance of ValueConstraint with the given property name, value and comparison type.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(ConstraintVisitor constraintVisitor)
Visit this range constraint.
|
ComparisonType |
getComparison()
Gets the kind of comparison to perform when evaluating property values.
|
T |
getValue()
Gets the value to use when evaluating property values.
|
void |
setValue(T value)
Sets the value to use when evaluating property values.
|
getPropertyName
getOperator, isNegated, negate, setOperator
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getOperator, isNegated, negate, setOperator
public ValueConstraint(java.lang.String name, T value)
name
- Name of the property being constrained.value
- Value to compare against the property value.public ValueConstraint(java.lang.String name, T value, ComparisonType comparison)
name
- Name of the property being constrained.value
- Value to compare against the property value.comparison
- ComparisonType defining the kind of comparison to perform when evaluating property values.public ValueConstraint(java.lang.String name, T value, ComparisonType comparison, Operator operator)
name
- Name of the property being constrained.value
- Value to compare against the property value.comparison
- ComparisonType defining the kind of comparison to perform when evaluating property values.operator
- Operator defining how this constraint is joined with other constraints.public ComparisonType getComparison()
public T getValue()
public void setValue(T value)
value
- Value to use when evaluating property values.public void accept(ConstraintVisitor constraintVisitor)
accept
in interface Constraint
constraintVisitor
- the ConstraintVisitor."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"