public final class AccessOperator extends java.lang.Object implements BinaryOperator
a.b or a[b]. It tries to access the key, index, field or method b of object a.| Constructor and Description |
|---|
AccessOperator() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
apply(java.lang.Object left,
Lazy right)
Applies the binary operator to the given operands.
|
public java.lang.Object apply(java.lang.Object left,
Lazy right)
throws CarrotException
BinaryOperatorNote that the right operand is passed as a Lazy because some operands may not need to evaluate it,
depending on the left operand (e.g. boolean `and` and `or` operators).
apply in interface BinaryOperatorleft - The left operand.right - The Lazy right operand.CarrotException - if there's any error applying the operator.