public final class BinaryOperatorCondition extends Condition
Condition
that represents a logical AND
or OR
condition that operates on two component Condition
objects.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OP_AND
A constant that represents the logical operator
AND . |
static java.lang.String |
OP_OR
A constant that represents the logical operator
OR . |
Constructor and Description |
---|
BinaryOperatorCondition(Condition[] arguments, java.lang.String operator)
Creates a new
BinaryOperatorCondition that has the specified arguments and operator. |
BinaryOperatorCondition(Condition lhsArgument, java.lang.String operator, Condition rhsArgument)
Creates a new
BinaryOperatorCondition that has the specified left-hand-side and right-hand-side arguments and operator. |
BinaryOperatorCondition(java.util.List<Condition> arguments, java.lang.String operator)
Creates a new
BinaryOperatorCondition that has the specified arguments and operator. |
Modifier and Type | Method and Description |
---|---|
Condition[] |
getArguments()
Gets the arguments for this
BinaryOperatorCondition . |
java.lang.String |
getOperator()
Gets the operator for this
BinaryOperatorCondition , which is either AND or OR . |
java.lang.Object |
visit(SyntaxObjectVisitor visitor, java.lang.Object context)
Calls the
visitBinaryOperatorCondition method of the SyntaxObjectVisitor and passes that method this BinaryOperatorCondition and an Object . |
and, isCompositeObject, not, or
equals, equals, fromSyntax, fromSyntax, fromSyntax, fromSyntax, fromSyntax, isValid, toSyntax, toSyntax, toSyntax, toSyntax, toSyntax, toSyntax
public static final java.lang.String OP_AND
AND
.public static final java.lang.String OP_OR
OR
.public BinaryOperatorCondition(Condition[] arguments, java.lang.String operator)
BinaryOperatorCondition
that has the specified arguments and operator.arguments
- An array of at least two Condition
objects.operator
- The operator to use, either OP_AND
or OP_OR
.public BinaryOperatorCondition(java.util.List<Condition> arguments, java.lang.String operator)
BinaryOperatorCondition
that has the specified arguments and operator.arguments
- A list of at least two Condition
objects.operator
- The operator to use, either OP_AND
or OP_OR
.public BinaryOperatorCondition(Condition lhsArgument, java.lang.String operator, Condition rhsArgument)
BinaryOperatorCondition
that has the specified left-hand-side and right-hand-side arguments and operator.lhsArgument
- The Condition
to use as the left-hand-side argument.operator
- The operator to use, either OP_AND
or OP_OR
.rhsArgument
- The Condition
to use as the right-hand-side argument.public java.lang.Object visit(SyntaxObjectVisitor visitor, java.lang.Object context)
visitBinaryOperatorCondition
method of the SyntaxObjectVisitor
and passes that method this BinaryOperatorCondition
and an Object
.visit
in class SyntaxObject
visitor
- A SyntaxObjectVisitor
.context
- An Object
.Object
returned by the visitBinaryOperatorCondition
method.public java.lang.String getOperator()
BinaryOperatorCondition
, which is either AND
or OR
.String
that contains AND
or OR
.public Condition[] getArguments()
BinaryOperatorCondition
.Condition
objects that are the left-hand-side and right-hand-side arguments for this BinaryOperatorCondition
.