org.geotools.filter.expression
Class AddImpl

java.lang.Object
  extended by org.geotools.filter.expression.ExpressionAbstract
      extended by org.geotools.filter.DefaultExpression
          extended by org.geotools.filter.MathExpressionImpl
              extended by org.geotools.filter.expression.AddImpl
All Implemented Interfaces:
ExpressionType, MathExpression, org.opengis.filter.expression.Add, org.opengis.filter.expression.BinaryExpression, org.opengis.filter.expression.Expression

public class AddImpl
extends MathExpressionImpl
implements org.opengis.filter.expression.Add

Implementation of Add expression.

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

Field Summary
 
Fields inherited from class org.geotools.filter.DefaultExpression
expressionType, permissiveConstruction
 
Fields inherited from interface org.opengis.filter.expression.Add
NAME
 
Fields inherited from interface org.opengis.filter.expression.Expression
NIL
 
Fields inherited from interface org.geotools.filter.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(org.opengis.filter.expression.Expression expr1, org.opengis.filter.expression.Expression expr2)
           
 
Method Summary
 java.lang.Object accept(org.opengis.filter.expression.ExpressionVisitor visitor, java.lang.Object extraData)
           
 boolean equals(java.lang.Object obj)
          Compares this expression to the specified object.
 java.lang.Object evaluate(java.lang.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.
 java.lang.String toString()
           
 
Methods inherited from class org.geotools.filter.MathExpressionImpl
addLeftValue, addRightValue, ensureOperandsSet, getExpression1, getExpression2, getLeftValue, getRightValue, getType, number, setExpression1, setExpression2
 
Methods inherited from class org.geotools.filter.DefaultExpression
accept, evaluate, getValue, isAttributeExpression, isExpression, isFunctionExpression, isGeometryExpression, isLiteralExpression, isMathExpression, isMathExpression
 
Methods inherited from class org.geotools.filter.expression.ExpressionAbstract
eval, eval, evaluate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opengis.filter.expression.BinaryExpression
getExpression1, getExpression2
 
Methods inherited from interface org.opengis.filter.expression.Expression
evaluate
 
Methods inherited from interface org.geotools.filter.MathExpression
getValue
 
Methods inherited from interface org.geotools.filter.Expression
accept, evaluate
 

Constructor Detail

AddImpl

public AddImpl(org.opengis.filter.expression.Expression expr1,
               org.opengis.filter.expression.Expression expr2)
Method Detail

evaluate

public java.lang.Object evaluate(java.lang.Object feature)
                          throws java.lang.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 org.opengis.filter.expression.Expression
Overrides:
evaluate in class DefaultExpression
Throws:
java.lang.IllegalArgumentException

accept

public java.lang.Object accept(org.opengis.filter.expression.ExpressionVisitor visitor,
                               java.lang.Object extraData)
Specified by:
accept in interface org.opengis.filter.expression.Expression

equals

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

Overrides:
equals in class java.lang.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 java.lang.Object
Returns:
a hash code value for this add expression.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 1996-2010 Geotools. All Rights Reserved.