Package org.geotools.filter.expression

Examples of org.geotools.filter.expression.SubtractImpl


    public Multiply multiply(Expression expr1, Expression expr2) {
        return new MultiplyImpl(expr1,expr2);
    }

    public Subtract subtract(Expression expr1, Expression expr2) {
        return new SubtractImpl(expr1,expr2);
    }
View Full Code Here


                switch(convertType) {
                case ExpressionType.MATH_ADD:
                    curExprssn =  new AddImpl(null,null);
                    break;
                case ExpressionType.MATH_SUBTRACT:
                    curExprssn =  new SubtractImpl(null,null);
                    break;
                case ExpressionType.MATH_MULTIPLY:
                    curExprssn =  new MultiplyImpl(null,null);
                    break;
                case ExpressionType.MATH_DIVIDE:
View Full Code Here

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

    // Test subtraction
    mathTest = new SubtractImpl(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(6), mathTest.evaluate(testObject,
        Integer.class));

    // Test subtraction
    mathTest = new SubtractImpl(null, null);
    mathTest.setExpression1(testAttribute1);
    mathTest.setExpression2(testAttribute2);

    assertEquals(new Integer(2), mathTest.evaluate(testObject,
        Integer.class));
View Full Code Here

      testExp4 = new LiteralExpressionImpl(new Integer(4));
      testMath2.setExpression1(testExp3);
      assertTrue(!testMath1.equals(testMath2));
      testMath1.setExpression1(testExp4);
      assertTrue(testMath1.equals(testMath2));
      testMath1 = new SubtractImpl(null,null);
      testMath1.setExpression1(testExp4);
      testMath1.setExpression1(testExp2);
      assertTrue(!testMath1.equals(testMath2));
            assertTrue(!testMath1.equals("Random Object that happens to be a string"));
  } catch (IllegalFilterException e){
View Full Code Here

TOP

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

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.