org.geotools.filter.expression
Class AddImpl
Object
ExpressionAbstract
DefaultExpression
MathExpressionImpl
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
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)
Subclass should override, default implementation just returns extraData |
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 interface BinaryExpression |
getExpression1, getExpression2 |
Methods inherited from interface Expression |
evaluate |
AddImpl
public AddImpl(Expression expr1,
Expression expr2)
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 class:
ExpressionAbstract
- Subclass should override, default implementation just returns extraData
- Specified by:
accept
in interface Expression
- Overrides:
accept
in class ExpressionAbstract
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-2009 Geotools. All Rights Reserved.