Package org.geotools.filter.expression

Examples of org.geotools.filter.expression.DivideImpl


    public Add add(Expression expr1, Expression expr2) {
        return new AddImpl(expr1,expr2);
    }

    public Divide divide(Expression expr1, Expression expr2) {
        return new DivideImpl(expr1,expr2);
    }
View Full Code Here


                    break;
                case ExpressionType.MATH_MULTIPLY:
                    curExprssn =  new MultiplyImpl(null,null);
                    break;
                case ExpressionType.MATH_DIVIDE:
                    curExprssn =  new DivideImpl(null,null);
                    break;
                default:
                    throw new IllegalFilterException("Unsupported math expression");
                }
                LOGGER.finer("is math expression");
View Full Code Here

        + mathTest.evaluate(testFeature));
    assertEquals(new Integer(8), mathTest.evaluate(testFeature,
        Integer.class));

    // Test division
    mathTest = new DivideImpl(null, null);
    mathTest.setExpression1(testAttribute1);
    mathTest.setExpression2(testAttribute2);
    LOGGER.fine("math test: " + testAttribute1.evaluate(testFeature)
        + " / " + testAttribute2.evaluate(testFeature) + " = "
        + mathTest.evaluate(testFeature));
View Full Code Here

    assertEquals(new Integer(8), mathTest.evaluate(testObject,
        Integer.class));

    // Test division
    mathTest = new DivideImpl(null, null);
    mathTest.setExpression1(testAttribute1);
    mathTest.setExpression2(testAttribute2);

    assertEquals(new Double(2), mathTest.evaluate(testObject));
  }
View Full Code Here

TOP

Related Classes of org.geotools.filter.expression.DivideImpl

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.