Class ComparatorExpression
- java.lang.Object
-
- software.amazon.smithy.jmespath.JmespathExpression
-
- software.amazon.smithy.jmespath.ast.BinaryExpression
-
- software.amazon.smithy.jmespath.ast.ComparatorExpression
-
public final class ComparatorExpression extends BinaryExpression
Compares the left and right expression using a comparator, resulting in a boolean value.
-
-
Constructor Summary
Constructors Constructor Description ComparatorExpression(ComparatorType comparator, JmespathExpression left, JmespathExpression right)
ComparatorExpression(ComparatorType comparator, JmespathExpression left, JmespathExpression right, int line, int column)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
accept(ExpressionVisitor<T> visitor)
Visits a node using a double-dispatch visitor.boolean
equals(java.lang.Object o)
ComparatorType
getComparator()
Gets the comparator to apply to the left and right expressions.int
hashCode()
java.lang.String
toString()
-
Methods inherited from class software.amazon.smithy.jmespath.ast.BinaryExpression
getLeft, getRight
-
-
-
-
Constructor Detail
-
ComparatorExpression
public ComparatorExpression(ComparatorType comparator, JmespathExpression left, JmespathExpression right)
-
ComparatorExpression
public ComparatorExpression(ComparatorType comparator, JmespathExpression left, JmespathExpression right, int line, int column)
-
-
Method Detail
-
accept
public <T> T accept(ExpressionVisitor<T> visitor)
Description copied from class:JmespathExpression
Visits a node using a double-dispatch visitor.- Specified by:
accept
in classJmespathExpression
- Type Parameters:
T
- Type of value the visitor returns.- Parameters:
visitor
- Visitor to accept on the node.- Returns:
- Returns the result of applying the visitor.
-
getComparator
public ComparatorType getComparator()
Gets the comparator to apply to the left and right expressions.- Returns:
- Returns the comparator.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classBinaryExpression
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classBinaryExpression
-
toString
public java.lang.String toString()
- Overrides:
toString
in classBinaryExpression
-
-