org.geotools.filter.expression
Class SubtractImpl
Object
ExpressionAbstract
DefaultExpression
MathExpressionImpl
SubtractImpl
- All Implemented Interfaces:
- ExpressionType, MathExpression, BinaryExpression, Expression, Subtract
public class SubtractImpl
- extends MathExpressionImpl
- implements Subtract
Implementation of Subtract expression.
- Author:
- Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
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 |
Methods inherited from class MathExpressionImpl |
addLeftValue, addRightValue, ensureOperandsSet, getExpression1, getExpression2, getLeftValue, getRightValue, getType, number, setExpression1, setExpression2 |
SubtractImpl
public SubtractImpl(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 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 subtract expression.
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 1996-2014 Geotools. All Rights Reserved.