com.amazonaws.jmespath

## Class Comparator

- java.lang.Object
- - com.amazonaws.jmespath.Comparator

All Implemented Interfaces:
  JmesPathExpression

Direct Known Subclasses:
  NumericComparator, OpEquals, OpNotEquals

    public abstract class Comparator
    extends Object
    implements JmesPathExpression

Parent class for different types of comparison operators.

### Field Summary

Fields
`protected JmesPathExpression` `lhsExpr` Represents the left expression
`protected JmesPathExpression` `rhsExpr` Represents the right expression

### Constructor Summary

Constructors
Constructor and Description
`Comparator(JmesPathExpression lhsExpr, JmesPathExpression rhsExpr)` Constructs a new Comparator with the given lhs amd rhs expressions.

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`JmesPathExpression` `getLhsExpr()`
`JmesPathExpression` `getRhsExpr()`
`abstract boolean` `matches(com.fasterxml.jackson.databind.JsonNode lhs, com.fasterxml.jackson.databind.JsonNode rhs)` Abstract method definition that is overriden by subclasses to compare the lhs and rhs expressions depending on the particular type of comparator

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface com.amazonaws.jmespath.JmesPathExpression

`accept`

### Field Detail

#### lhsExpr

    protected final JmesPathExpression lhsExpr

Represents the left expression

#### rhsExpr

    protected final JmesPathExpression rhsExpr

Represents the right expression

### Constructor Detail

#### Comparator

    public Comparator(JmesPathExpression lhsExpr,
                      JmesPathExpression rhsExpr)

Constructs a new Comparator with the given lhs amd rhs expressions.

Parameters:
  `lhsExpr` - Left expression
  `rhsExpr` - Right expression

### Method Detail

#### getLhsExpr

    public JmesPathExpression getLhsExpr()

#### getRhsExpr

    public JmesPathExpression getRhsExpr()

#### matches

    public abstract boolean matches(com.fasterxml.jackson.databind.JsonNode lhs,
                                    com.fasterxml.jackson.databind.JsonNode rhs)

Abstract method definition that is overriden by subclasses to compare the lhs and rhs expressions depending on the particular type of comparator

Parameters:
  `lhs` - Lhs expression
  `rhs` - Rhs expression
Returns:
  True if the comparison is evaluated to true; False otherwise