public class RelationalOperatorImpl extends RelationalOperator implements Reference
Constructor and Description |
---|
RelationalOperatorImpl(Reference reference,
RangeReference rangeReference,
Reference reference0) |
Modifier and Type | Method and Description |
---|---|
Object |
accept(ExpressionVisitor visitor)
Accepts to visit the given expression visitor.
|
<T> boolean |
compare(Comparable<T> left,
T right)
Applies the operator to the given operands and returns a boolean value.
|
int |
compareTo(Reference reference)
Compares the reference with the given reference for order.
|
Value |
evaluate()
Evaluates the expression and returns the result.
|
SortedSet<Cell> |
getCells()
Returns the cell addresses (or address) that the reference points to.
|
String |
getIdentifier()
Returns the operator's string identirifer.
|
applyTo, getOperandValueType, toString
public RelationalOperatorImpl(Reference reference, RangeReference rangeReference, Reference reference0)
public <T> boolean compare(Comparable<T> left, T right)
RelationalOperator
compare
in class RelationalOperator
left
- the value of the left operandright
- the value of the right operandpublic String getIdentifier()
Operator
getIdentifier
in interface Operator
public Value evaluate()
Expression
evaluate
in interface Expression
evaluate
in interface Reference
public SortedSet<Cell> getCells()
Reference
public int compareTo(Reference reference)
Reference
compareTo
in interface Reference
compareTo
in interface Comparable<Reference>
reference
- the reference to be comparedpublic Object accept(ExpressionVisitor visitor)
Expression
accept
in interface Expression
visitor
- the visitor