Package org.boris.expr

Examples of org.boris.expr.AbstractBinaryOperator


        if (arg instanceof ExprString) {
            String s = ((ExprString) arg).str;
            if ("".equals(s))
                return null;
            Condition c = new Condition();
            AbstractBinaryOperator operator;
            int offset = 0;
            boolean str = false;
            if (s.startsWith(">=")) {
                operator = new ExprGreaterThanOrEqualTo(null, null);
                offset = 2;
            } else if (s.startsWith("<=")) {
                operator = new ExprLessThanOrEqualTo(null, null);
                offset = 2;
            } else if (s.startsWith("<>")) {
                operator = new ExprNotEqual(null, null);
                offset = 2;
            } else if (s.startsWith("=")) {
                operator = new ExprEqual(null, null);
                offset = 1;
            } else if (s.startsWith("<")) {
                operator = new ExprLessThan(null, null);
                offset = 1;
            } else if (s.startsWith(">")) {
                operator = new ExprGreaterThan(null, null);
                offset = 1;
            } else {
                operator = new ExprEqual(null, null);
                str = true;
                offset = 0;
            }

            operator.setRHS(c.getRHS(s, offset, str));
            c.operators.add(operator);
            return c;
        } else if (arg instanceof ExprDouble || arg instanceof ExprInteger) {
            Condition c = new Condition();
            AbstractBinaryOperator operator = new ExprEqual(null, arg);
            c.operators.add(operator);
            return c;
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.boris.expr.AbstractBinaryOperator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.