public final class ListComparisonCondition extends ComparisonCondition
ComparisonCondition
that represents a group comparison condition, which compares one expression to a list of expressions. The operator for a ListComparisonCondition
is any of the ComparisonCondition
constants. That operator is qualified by one of the ListComparisonCondition
constants, ALL
, ANY
, or SOME
.
A ListComparisonCondition
with the ANY
or SOME
qualifier evaluates to true
if the value of the left-hand-side expression matches the value of one or more expressions in the right-hand-side list of expressions. A ListComparisonCondition
with the ALL
qualifier evaluates to true
if the value of the left-hand-side expression matches the values of all of the expressions in the list of expressions.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALL
A constant for the ALL operator.
|
static java.lang.String |
ANY
A constant for the ANY operator.
|
static java.lang.String |
SOME
A constant for the SOME operator.
|
Constructor and Description |
---|
ListComparisonCondition(TypedExpression lhs, java.lang.String operator, java.lang.String qualifier, java.util.List<TypedExpression> list)
Creates a new
ListComparisonCondition that has the specified left-hand-side argument expression, operator, qualifier, and list of TypedExpression objects. |
ListComparisonCondition(TypedExpression lhs, java.lang.String operator, java.lang.String qualifier, TypedExpression[] list)
Creates a new
ListComparisonCondition that has the specified left-hand-side argument expression, operator, qualifier, and list of TypedExpression objects. |
ListComparisonCondition(TypedExpression lhs, java.lang.String operator, TypedExpression[] list)
Creates a new
ListComparisonCondition that has the specified left-hand-side argument expression, operator, and list of TypedExpression objects, and has the ANY qualifier. |
ListComparisonCondition(TypedExpression lhs, TypedExpression[] list)
Creates a new
ListComparisonCondition that has the specified left-hand-side argument expression and list of TypedExpression objects, and has the EQ operator and the ANY qualifier. |
Modifier and Type | Method and Description |
---|---|
TypedExpression[] |
getList()
Gets the list of expressions of this
ListComprisonCondition that the operation compares to the left-hand-side argument expression. |
java.lang.String |
getQualifier()
Gets the qualifier of this
ListComprisonCondition , which can be ALL , ANY , or SOME . |
java.lang.Object |
visit(SyntaxObjectVisitor visitor, java.lang.Object context)
Calls the
visitListComparisonCondition method of the SyntaxObjectVisitor and passes that method this ListComparisonCondition and an Object . |
getLhsArgument, getOperator
and, isCompositeObject, not, or
equals, equals, fromSyntax, fromSyntax, fromSyntax, fromSyntax, fromSyntax, isValid, toSyntax, toSyntax, toSyntax, toSyntax, toSyntax, toSyntax
public static final java.lang.String ALL
public static final java.lang.String SOME
public static final java.lang.String ANY
public ListComparisonCondition(TypedExpression lhs, java.lang.String operator, java.lang.String qualifier, TypedExpression[] list)
ListComparisonCondition
that has the specified left-hand-side argument expression, operator, qualifier, and list of TypedExpression
objects.lhs
- The TypedExpression
to use as the left-hand-side argument.operator
- The operator to use, which can be any of the ComparisonCondition
constants.qualifier
- One of the ListComparisonCondition
constants ALL
, ANY
, or SOME
.list
- An array of TypedExpression
objects.public ListComparisonCondition(TypedExpression lhs, java.lang.String operator, java.lang.String qualifier, java.util.List<TypedExpression> list)
ListComparisonCondition
that has the specified left-hand-side argument expression, operator, qualifier, and list of TypedExpression
objects.lhs
- The TypedExpression
to use as the left-hand-side argument.operator
- The operator to use, which can be any of the ComparisonCondition
constants.qualifier
- One of the ListComparisonCondition
constants ALL
, ANY
, or SOME
.list
- A List
of TypedExpression
objects.public ListComparisonCondition(TypedExpression lhs, java.lang.String operator, TypedExpression[] list)
ListComparisonCondition
that has the specified left-hand-side argument expression, operator, and list of TypedExpression
objects, and has the ANY
qualifier.lhs
- The TypedExpression
to use as the left-hand-side argument.operator
- The operator to use, which can be any of the ComparisonCondition
constants.list
- An array of TypedExpression
objects.public ListComparisonCondition(TypedExpression lhs, TypedExpression[] list)
ListComparisonCondition
that has the specified left-hand-side argument expression and list of TypedExpression
objects, and has the EQ
operator and the ANY
qualifier.lhs
- The TypedExpression
to use as the left-hand-side argument.list
- An array of TypedExpression
objects.public java.lang.Object visit(SyntaxObjectVisitor visitor, java.lang.Object context)
visitListComparisonCondition
method of the SyntaxObjectVisitor
and passes that method this ListComparisonCondition
and an Object
.visit
in class SyntaxObject
visitor
- A SyntaxObjectVisitor
.context
- An Object
.Object
returned by the visitListComparisonCondition
method.public TypedExpression[] getList()
ListComprisonCondition
that the operation compares to the left-hand-side argument expression.TypedExpression
objects.public java.lang.String getQualifier()
ListComprisonCondition
, which can be ALL
, ANY
, or SOME
.String
that contains the qualifier of this ListComprisonCondition
.