## dods.dap.Server
Class Operator

    java.lang.Object
      dods.dap.Server.Operator

All Implemented Interfaces:
  ExprParserConstants

public class Operator
extends Object
implements ExprParserConstants

This class contains the code for performing relative operations (RelOps) on BaseTypes. It contains one heavily overloaded method that is smart enough to figure out which actual BaseType were passed in and perform (if appropriate) the RelOp comparison on the 2 types.

Field Summary

Fields inherited from interface dods.dap.parser.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 Summary
`Operator()`

Method Summary
`static boolean` `op(int oprtr, BaseType lop, BaseType rop)` Performs the Relatove Operation (RelOp) indicated by the parameter `oprtr` on the 2 passed BaseTypes if appropriate.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Operator

    public Operator()

Method Detail

### op

    public static boolean op(int oprtr,
                             BaseType lop,
                             BaseType rop)
                      throws InvalidOperatorException,
                             RegExpException,
                             SBHException

  Performs the Relatove Operation (RelOp) indicated by the parameter `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.

  Parameters:
    `oprtr` - The operatoration to perform as defined in `dods.dap.parser.ExprParserConstants`
    `lop` - A BaseType to be used as the left operand.
    `rop` - A BaseType to be used as the right operand.
  Throws:
    `InvalidOperatorException`
    `RegExpException`
    `SBHException`
  See Also:
    `ExprParserConstants`