opendap/src/main/java/opendap/servers/Operator.java
public static boolean op(int oprtr, BaseType lop, BaseType rop) throws InvalidOperatorException,
            RegExpException,
            SBHException {
        if (lop instanceof DByte)
            return (op(oprtr, (DByte) lop, rop));
        else if (lop instanceof DFloat32)
            return (op(oprtr, (DFloat32) lop, rop));
        else if (lop instanceof DFloat64)
            return (op(oprtr, (DFloat64) lop, rop));
        else if (lop instanceof DInt16)
            return (op(oprtr, (DInt16) lop, rop));
        else if (lop instanceof DInt32)
            return (op(oprtr, (DInt32) lop, rop));
        else if (lop instanceof DString)
            return (op(oprtr, (DString) lop, rop));
        else if (lop instanceof DUInt16)
            return (op(oprtr, (DUInt16) lop, rop));
        else if (lop instanceof DUInt32)
            return (op(oprtr, (DUInt32) lop, rop));
        else if (lop instanceof DURL)
            return (op(oprtr, (DURL) lop, rop));
        else
            throw new InvalidOperatorException("Binary operations not supported for the type:" + lop.getClass());
    }
public static boolean op(int oprtr, BaseType lop, BaseType rop) throws InvalidOperatorException,
            RegExpException,
            SBHException {
        if (lop instanceof DByte)
            return (op(oprtr, (DByte) lop, rop));
        else if (lop instanceof DFloat32)
            return (op(oprtr, (DFloat32) lop, rop));
        else if (lop instanceof DFloat64)
            return (op(oprtr, (DFloat64) lop, rop));
        else if (lop instanceof DInt16)
            return (op(oprtr, (DInt16) lop, rop));
        else if (lop instanceof DInt32)
            return (op(oprtr, (DInt32) lop, rop));
        else if (lop instanceof DString)
            return (op(oprtr, (DString) lop, rop));
        else if (lop instanceof DUInt16)
            return (op(oprtr, (DUInt16) lop, rop));
        else if (lop instanceof DUInt32)
            return (op(oprtr, (DUInt32) lop, rop));
        else if (lop instanceof DURL)
            return (op(oprtr, (DURL) lop, rop));
        else
            throw new InvalidOperatorException("Binary operations not supported for the type:" + lop.getClass());
    }
public static boolean op ( int oprtr , BaseType lop , BaseType rop ) throws InvalidOperatorException , RegExpException , SBHException { if ( lop instanceof DByte ) return ( op ( oprtr , ( DByte ) lop , rop ) ) ; else if ( lop instanceof DFloat32 ) return ( op ( oprtr , ( DFloat32 ) lop , rop ) ) ; else if ( lop instanceof DFloat64 ) return ( op ( oprtr , ( DFloat64 ) lop , rop ) ) ; else if ( lop instanceof DInt16 ) return ( op ( oprtr , ( DInt16 ) lop , rop ) ) ; else if ( lop instanceof DInt32 ) return ( op ( oprtr , ( DInt32 ) lop , rop ) ) ; else if ( lop instanceof DString ) return ( op ( oprtr , ( DString ) lop , rop ) ) ; else if ( lop instanceof DUInt16 ) return ( op ( oprtr , ( DUInt16 ) lop , rop ) ) ; else if ( lop instanceof DUInt32 ) return ( op ( oprtr , ( DUInt32 ) lop , rop ) ) ; else if ( lop instanceof DURL ) return ( op ( oprtr , ( DURL ) lop , rop ) ) ; else throw new InvalidOperatorException ( "Binary operations not supported for the type:" + lop . getClass ( ) ) ; }
Performs the Relatove Operation (RelOp) indicated by the
parameter <code>oprtr</code> on the 2 passed BaseTypes if
appropriate.
<p/>
Obviously some type don't compare logically, such as asking if
String is less than a Float. For these non sensical operations
and <code>InvalidOperatorException</code> is thrown.

@param oprtr The operatoration to perform as defined in <code>
opendap.servers.parsers.ExprParserConstants</code>
@param lop   A BaseType to be used as the left operand.
@param rop   A BaseType to be used as the right operand.
@return True is the operation evaluates as true, flase otherwise.
@throws InvalidOperatorException
@throws RegExpException
@throws SBHException
@see opendap.servers.parsers.ExprParserConstants
Performs the Relatove Operation ( RelOp ) indicated by the parameter <code > oprtr< / code > on the 2 passed BaseTypes if appropriate . <p / > Obviously some type don t compare logically such as asking if String is less than a Float . For these non sensical operations and <code > InvalidOperatorException< / code > is thrown .