org.geotools.filter.expression
Class AddImpl

Object
  extended by ExpressionAbstract
      extended by DefaultExpression
          extended by MathExpressionImpl
              extended by AddImpl
All Implemented Interfaces:
ExpressionType, MathExpression, Add, BinaryExpression, Expression

public class AddImpl
extends MathExpressionImpl
implements Add

Implementation of Add expression.

Author:
Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org

Field Summary
 
Fields inherited from class DefaultExpression
expressionType, permissiveConstruction
 
Fields inherited from interface Add
NAME
 
Fields inherited from interface Expression
NIL
 
Fields inherited from interface ExpressionType
ATTRIBUTE, ATTRIBUTE_DOUBLE, ATTRIBUTE_GEOMETRY, ATTRIBUTE_INTEGER, ATTRIBUTE_STRING, ATTRIBUTE_UNDECLARED, FUNCTION, LITERAL_DOUBLE, LITERAL_GEOMETRY, LITERAL_INTEGER, LITERAL_LONG, LITERAL_STRING, LITERAL_UNDECLARED, MATH_ADD, MATH_DIVIDE, MATH_MULTIPLY, MATH_SUBTRACT
 
Constructor Summary
AddImpl(Expression expr1, Expression expr2)
           
 
Method Summary
 Object accept(ExpressionVisitor visitor, Object extraData)
          Accepts a visitor.
 boolean equals(Object obj)
          Compares this expression to the specified object.
 Object evaluate(Object feature)
          This method checks if the object is an instance of Feature and if so, calls through to #evaluate(Feature).
 int hashCode()
          Override of hashCode method.
 String toString()
           
 
Methods inherited from class MathExpressionImpl
addLeftValue, addRightValue, ensureOperandsSet, getExpression1, getExpression2, getLeftValue, getRightValue, getType, number, setExpression1, setExpression2
 
Methods inherited from class DefaultExpression
accept, evaluate, getValue, isAttributeExpression, isExpression, isFunctionExpression, isGeometryExpression, isLiteralExpression, isMathExpression, isMathExpression
 
Methods inherited from class ExpressionAbstract
eval, eval, evaluate
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface BinaryExpression
getExpression1, getExpression2
 
Methods inherited from interface Expression
evaluate
 
Methods inherited from interface MathExpression
getValue
 
Methods inherited from interface Expression
accept, evaluate
 

Constructor Detail

AddImpl

public AddImpl(Expression expr1,
               Expression expr2)
Method Detail

evaluate

public Object evaluate(Object feature)
                throws IllegalArgumentException
Description copied from class: DefaultExpression
This method checks if the object is an instance of Feature and if so, calls through to #evaluate(Feature). This is done to maintain backwards compatability with previous version of Expression api which depended on Feature. If the object is not an instance of feature the super implementation is called.

Specified by:
evaluate in interface Expression
Overrides:
evaluate in class DefaultExpression
Throws:
IllegalArgumentException

accept

public Object accept(ExpressionVisitor visitor,
                     Object extraData)
Description copied from interface: Expression
Accepts a visitor. Subclasses must implement with a method whose content is the following:
return visitor.visit(this, extraData);

Specified by:
accept in interface Expression

equals

public boolean equals(Object obj)
Compares this expression to the specified object. Returns true if the

Overrides:
equals in class Object
Parameters:
obj - - the object to compare this expression against.
Returns:
true if specified object is equal to this expression; false otherwise.

hashCode

public int hashCode()
Override of hashCode method.

Overrides:
hashCode in class Object
Returns:
a hash code value for this add expression.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1996-2014 Geotools. All Rights Reserved.