T
- the type of object that is being queried.public class RangeConstraint<T> extends AbstractPropertyConstraint implements Constraint
Constructor and Description |
---|
RangeConstraint(java.lang.String propertyName,
T minValue,
T maxValue)
Creates a new instance of RangeConstraint (inclusive) against the given propertyName with minValue and
maxValue.
|
RangeConstraint(java.lang.String propertyName,
T minValue,
T maxValue,
boolean inclusive)
Creates a new instance of RangeConstraint against the given propertyName with minValue and maxValue.
|
RangeConstraint(java.lang.String propertyName,
T minValue,
T maxValue,
boolean inclusive,
Operator operator)
Creates a new instance of RangeConstraint against the given propertyName with minValue and maxValue.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(ConstraintVisitor constraintVisitor)
Visit this range constraint.
|
T |
getMaxValue()
Gets the maximum value of this constraint.
|
T |
getMinValue()
Gets the minimum value of this constraint.
|
boolean |
isInclusive()
Whether the range should include the minimum value and maximum value (inclusive) or not.
|
void |
setMaxValue(T maxValue)
Gets the maximum value of this constraint.
|
void |
setMinValue(T minValue)
Sets the minimum value of this constraint.
|
getPropertyName
getOperator, isNegated, negate, setOperator
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getOperator, isNegated, negate, setOperator
public RangeConstraint(java.lang.String propertyName, T minValue, T maxValue)
propertyName
- Name of the property being constrained.minValue
- Minimum value for the range.maxValue
- Maximum value for the range.public RangeConstraint(java.lang.String propertyName, T minValue, T maxValue, boolean inclusive)
propertyName
- Name of the property being constrained.minValue
- Minimum value for the range.maxValue
- Maximum value for the range.inclusive
- True if the results should include minValue and maxValue, false otherwise.public RangeConstraint(java.lang.String propertyName, T minValue, T maxValue, boolean inclusive, Operator operator)
propertyName
- Name of the property being constrained.minValue
- Minimum value for the range.maxValue
- Maximum value for the range.inclusive
- True if the results should include minValue and maxValue, false otherwise.operator
- Operator that defines how this constraint is joined with other constraints.public T getMinValue()
public void setMinValue(T minValue)
minValue
- The minimum value of this constraint.public T getMaxValue()
public void setMaxValue(T maxValue)
maxValue
- The minimum value of this constraint.public boolean isInclusive()
public void accept(ConstraintVisitor constraintVisitor)
accept
in interface Constraint
constraintVisitor
- the ConstraintVisitor."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"