org.geotools.filter.function
Class FilterFunction_distance

java.lang.Object
  extended byorg.geotools.filter.expression.ExpressionAbstract
      extended byorg.geotools.filter.DefaultExpression
          extended byorg.geotools.filter.FunctionExpressionImpl
              extended byorg.geotools.filter.function.FilterFunction_distance
All Implemented Interfaces:
org.opengis.filter.expression.Expression, Expression, ExpressionType, Factory, org.opengis.filter.expression.Function, FunctionExpression

public class FilterFunction_distance
extends FunctionExpressionImpl
implements FunctionExpression


Field Summary
 
Fields inherited from class org.geotools.filter.DefaultExpression
expressionType, permissiveConstruction
 
Fields inherited from interface org.geotools.filter.expression.ExpressionType
ATTRIBUTE, ATTRIBUTE_DOUBLE, ATTRIBUTE_GEOMETRY, ATTRIBUTE_INTEGER, ATTRIBUTE_STRING, ATTRIBUTE_UNDECLARED, FUNCTION, LITERAL_DOUBLE, LITERAL_GEOMETRY, LITERAL_INTEGER, LITERAL_STRING, MATH_ADD, MATH_DIVIDE, MATH_MULTIPLY, MATH_SUBTRACT
 
Constructor Summary
FilterFunction_distance()
           
 
Method Summary
 java.lang.Object evaluate(Feature feature)
          Evaluates the expression against an instance of Feature.
 int getArgCount()
          Returns the number of arguments this requires.
 Expression[] getArgs()
          Gets the arguments to be evaluated by this function.
 java.lang.String getName()
          Gets the name of this function.
 void setArgs(Expression[] args)
          Sets the arguments to be evaluated by this function.
 java.lang.String toString()
           
 
Methods inherited from class org.geotools.filter.FunctionExpressionImpl
accept, getImplementationHints, getParameters, getType, setName, setParameters
 
Methods inherited from class org.geotools.filter.DefaultExpression
accept, evaluate, getValue, isAttributeExpression, isExpression, isGeometryExpression, isLiteralExpression, isMathExpression, isMathExpression
 
Methods inherited from class org.geotools.filter.expression.ExpressionAbstract
eval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.geotools.filter.expression.FunctionExpression
getType
 
Methods inherited from interface org.geotools.filter.expression.Expression
accept, getValue
 
Methods inherited from interface org.opengis.filter.expression.Expression
accept, evaluate
 
Methods inherited from interface org.geotools.factory.Factory
getImplementationHints
 
Methods inherited from interface org.opengis.filter.expression.Function
getParameters, setName, setParameters
 

Constructor Detail

FilterFunction_distance

public FilterFunction_distance()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: FunctionExpression
Gets the name of this function.

Specified by:
getName in interface FunctionExpression
Overrides:
getName in class FunctionExpressionImpl
Returns:
the name of the function.

getArgCount

public int getArgCount()
Description copied from interface: FunctionExpression
Returns the number of arguments this requires. For example [arg1][arg2]. This function must have EXACTLY 2 arguments, so this function would return 2. The parser might use this information to ensure validity, and its also for reporting capabilities. NOTE: this was previously javadoc-ed incorrectly, please note the new definition. NOTE: you cannot have a function with a variable number of arguments.

Specified by:
getArgCount in interface FunctionExpression
Specified by:
getArgCount in class FunctionExpressionImpl
Returns:
the number of args.

setArgs

public void setArgs(Expression[] args)
Description copied from interface: FunctionExpression
Sets the arguments to be evaluated by this function.

Specified by:
setArgs in interface FunctionExpression
Overrides:
setArgs in class FunctionExpressionImpl

getArgs

public Expression[] getArgs()
Description copied from interface: FunctionExpression
Gets the arguments to be evaluated by this function.

Specified by:
getArgs in interface FunctionExpression
Overrides:
getArgs in class FunctionExpressionImpl

toString

public java.lang.String toString()

evaluate

public java.lang.Object evaluate(Feature feature)
Description copied from interface: Expression
Evaluates the expression against an instance of Feature.

Specified by:
evaluate in interface Expression
Overrides:
evaluate in class DefaultExpression
Parameters:
feature - Specified feature to use when returning value.
Returns:
The value of this expression based on the feature.


Copyright © GeoTools. All Rights Reserved.