Class SingleComparisonNode
java.lang.Object
org.eclipse.ditto.rql.model.predicates.ast.SingleComparisonNode
- All Implemented Interfaces:
Node
Implements a comparison node like EQ (equals). A comparison node has a name, a property to compare on and a single
value to compare for.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDefines the possible types that aSingleComparisonNodecan have. -
Constructor Summary
ConstructorsConstructorDescriptionSingleComparisonNode(SingleComparisonNode.Type comparisonType, String comparisonProperty, Object comparisonValue) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(PredicateVisitor predicateVisitor) PredicateVisitor Pattern.booleanRetrieve the property to compare on.Retrieve the type of the comparison.Retrieve the value to compare for.inthashCode()toString()
-
Constructor Details
-
SingleComparisonNode
public SingleComparisonNode(SingleComparisonNode.Type comparisonType, String comparisonProperty, @Nullable Object comparisonValue) Constructor. Creates a new comparison node with the given type, property and value.- Parameters:
comparisonType- the type of the comparison.comparisonProperty- the property to compare on.comparisonValue- the value to compare for.
-
-
Method Details
-
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
-