Class MultiComparisonNode
java.lang.Object
org.eclipse.ditto.rql.model.predicates.ast.MultiComparisonNode
- All Implemented Interfaces:
Node
Implements a comparison node like IN (in array). A comparison node has a name, a property to compare on and a array
of values to compare for.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDefines the possible types that aMultiComparisonNodecan have. -
Constructor Summary
ConstructorsConstructorDescriptionMultiComparisonNode(MultiComparisonNode.Type comparisonType, String comparisonProperty) Constructor.MultiComparisonNode(MultiComparisonNode.Type comparisonType, String comparisonProperty, List<Object> comparisonPropertyValues) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(PredicateVisitor predicateVisitor) PredicateVisitor Pattern.voidAdd the given value to the list of values.booleanRetrieve the property to compare on.Retrieve the type of the comparison.Retrieve the value to compare for.inthashCode()toString()
-
Constructor Details
-
MultiComparisonNode
Constructor. Creates a new comparison node with the given type, property and list of values.- Parameters:
comparisonType- the type of the comparison.comparisonProperty- the property to compare on.
-
MultiComparisonNode
public MultiComparisonNode(MultiComparisonNode.Type comparisonType, String comparisonProperty, List<Object> comparisonPropertyValues) Constructor. Creates a new comparison node with the given type, property and list of values.- Parameters:
comparisonType- the type of the comparison.comparisonProperty- the property to compare on.comparisonPropertyValues- the property to compare on.
-
-
Method Details
-
addValue
Add the given value to the list of values.- Parameters:
value- the value to add.
-
accept
PredicateVisitor Pattern. Takes a visitor as parameter and calls the corresponding visit method with itself as parameter. -
getComparisonType
Retrieve the type of the comparison.- Returns:
- the type of the comparison.
-
getComparisonProperty
Retrieve the property to compare on.- Returns:
- the property to compare on.
-
getComparisonValue
Retrieve the value to compare for.- Returns:
- the value to compare for.
-
toString
-
hashCode
public int hashCode() -
equals
-