@Immutable public class Between extends Object implements Constraint, Between
Constructor and Description |
---|
Between(DynamicOperand operand,
StaticOperand lowerBound,
StaticOperand upperBound)
Create a constraint that the values of the supplied dynamic operand are between the lower and upper bounds (inclusive).
|
Between(DynamicOperand operand,
StaticOperand lowerBound,
StaticOperand upperBound,
boolean includeLowerBound,
boolean includeUpperBound)
Create a constraint that the values of the supplied dynamic operand are between the lower and upper bounds, specifying
whether the boundary values are to be included in the range.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor)
Accept the supplied visitor, which should call back to the visitor to complete the double-dispatch operation.
|
boolean |
equals(Object obj) |
StaticOperand |
getLowerBound()
Get the lower bound operand.
|
DynamicOperand |
getOperand()
Get the dynamic operand specification.
|
StaticOperand |
getUpperBound()
Get the upper bound operand.
|
int |
hashCode() |
boolean |
isLowerBoundIncluded()
Return whether the lower bound is to be included in the results.
|
boolean |
isUpperBoundIncluded()
Return whether the upper bound is to be included in the results.
|
String |
toString() |
public Between(DynamicOperand operand, StaticOperand lowerBound, StaticOperand upperBound)
operand
- the dynamic operand describing the values that are to be constrainedlowerBound
- the lower bound of the rangeupperBound
- the upper bound of the rangeIllegalArgumentException
- if any of the arguments are nullpublic Between(DynamicOperand operand, StaticOperand lowerBound, StaticOperand upperBound, boolean includeLowerBound, boolean includeUpperBound)
operand
- the dynamic operand describing the values that are to be constrainedlowerBound
- the lower bound of the rangeupperBound
- the upper bound of the rangeincludeLowerBound
- true if the lower boundary value is not be includedincludeUpperBound
- true if the upper boundary value is not be includedIllegalArgumentException
- if any of the arguments are nullpublic DynamicOperand getOperand()
Between
getOperand
in interface Between
public StaticOperand getLowerBound()
Between
getLowerBound
in interface Between
public StaticOperand getUpperBound()
Between
getUpperBound
in interface Between
public boolean isLowerBoundIncluded()
Between
isLowerBoundIncluded
in interface Between
lower bound
is to be included, or false otherwisepublic boolean isUpperBoundIncluded()
Between
isUpperBoundIncluded
in interface Between
upper bound
is to be included, or false otherwiseCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.