public class Operator extends Object implements ExprParserConstants
AMPERSAND, ASTERISK, COLON, COMMA, DEFAULT, EOF, EQUAL, EXPONENT, FLOAT, GREATER, GREATER_EQL, ID, INT, LBRACE, LBRACKET, LESS, LESS_EQL, LPAREN, MANTISSA, NOT_EQUAL, QUOTED_STR, RBRACE, RBRACKET, REGEXP, RPAREN, SEPARATOR, STR, tokenImage, UNQUOTED_STR, UNTERM_QUOTE| Constructor and Description |
|---|
Operator() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
op(int oprtr,
dods.dap.BaseType lop,
dods.dap.BaseType rop)
Performs the Relatove Operation (RelOp) indicated by the
parameter
oprtr on the 2 passed BaseTypes if
appropriate. |
public static boolean op(int oprtr,
dods.dap.BaseType lop,
dods.dap.BaseType rop)
throws InvalidOperatorException,
RegExpException,
SBHException
oprtr on the 2 passed BaseTypes if
appropriate.
Obviously some type don't compare logically, such as asking if
String is less than a Float. For these non sensical operations
and InvalidOperatorException is thrown.
oprtr - The operatoration to perform as defined in
dods.dap.parser.ExprParserConstantslop - A BaseType to be used as the left operand.rop - A BaseType to be used as the right operand.InvalidOperatorExceptionRegExpExceptionSBHExceptionExprParserConstants