public abstract class NumericComparator extends Comparator
Constructor and Description |
---|
NumericComparator(JmesPathExpression lhsExpr,
JmesPathExpression rhsExpr)
Constructs a new Comparator with the given lhs amd rhs
expressions.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
matches(BigDecimal lhs,
BigDecimal rhs)
Abstract method definition that is overriden by the
subclasses to compare the given lhs and rhs numbers
according to the given comparator
|
boolean |
matches(com.fasterxml.jackson.databind.JsonNode lhs,
com.fasterxml.jackson.databind.JsonNode rhs)
Converts the lhs and rhs JsonNodes to the numeric values
and delegates to the matches method that operates on the
numeric values alone.
|
getLhsExpr, getRhsExpr
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accept
public NumericComparator(JmesPathExpression lhsExpr, JmesPathExpression rhsExpr)
lhsExpr
- Left expressionrhsExpr
- Right expressionpublic final boolean matches(com.fasterxml.jackson.databind.JsonNode lhs, com.fasterxml.jackson.databind.JsonNode rhs)
matches
in class Comparator
lhs
- Lhs expressionrhs
- Rhs expressionpublic abstract boolean matches(BigDecimal lhs, BigDecimal rhs)
lhs
- Lhs Numberrhs
- Rhs Number