GeoTools : SimpleMathExpression

Simple math expression which processes a simple add on two integers.

        MathExpr one = new LiteralMathExpr( 1 );
    	MathExpr two = new LiteralMathExpr( 2 );
    	MathExpr add = one.add( two );
    	Expr value = add.eval();
    	System.out.println(value);
    	LiteralMathExpr sum = (LiteralMathExpr) value;
    	System.out.println(sum.toDouble());