Known Direct Subclasses
OpAnd,
OpDivide,
OpEQ,
OpGE,
OpGT,
OpLE,
OpLT,
OpMinus,
OpModulus,
OpMultiply,
OpNE,
OpOr,
OpPlus,
OperatorBetween,
OperatorInstanceof,
OperatorMatches,
OperatorPower
OpAnd |
Represents the boolean AND operation. |
OpDivide |
Implements division operator. |
OpEQ |
Implements equality operator. |
OpGE |
Implements greater-than-or-equal operator. |
OpGT |
Implements greater-than operator. |
OpLE |
Implements the less-than-or-equal operator. |
OpLT |
Implements the less-than operator. |
OpMinus |
The minus operator supports:
- subtraction of doubles (floats are represented as doubles)
- subtraction of longs
- subtraction of integers
- subtraction of an int from a string of one character (effectively decreasing that character), so 'd'-3='a'
It can be used as a unary operator for numbers (double/long/int). |
OpModulus |
Implements the modulus operator. |
OpMultiply |
Implements the multiply operator. |
OpNE |
Implements the not-equal operator. |
OpOr |
Represents the boolean OR operation. |
OpPlus |
The plus operator will:
- add doubles (floats are represented as doubles)
- add longs
- add integers
- concatenate strings
It can be used as a unary operator for numbers (double/long/int). |
OperatorBetween |
Represents the between operator. |
OperatorInstanceof |
The operator 'instanceof' checks if an object is of the class specified in the right hand operand,
in the same way that instanceof does in Java. |
OperatorMatches |
Implements the matches operator. |
OperatorPower |
The power operator. |
|
Class Overview
Common supertype for operators that operate on either one or two operands. In the case of multiply or divide there
would be two operands, but for unary plus or minus, there is only one.
Public Constructors
Public Methods
public
final
String
getOperatorName
()
public
String
toStringAST
()
String format for all operators is the same '(' [operand] [operator] [operand] ')'