org.geotools.filter
Class FunctionImpl

java.lang.Object
  extended by org.geotools.filter.expression.ExpressionAbstract
      extended by org.geotools.filter.FunctionImpl
All Implemented Interfaces:
org.opengis.filter.expression.Expression, org.opengis.filter.expression.Function
Direct Known Subclasses:
ConcatenateFunction

public class FunctionImpl
extends ExpressionAbstract
implements org.opengis.filter.expression.Function

Default implementation of a Function; you may extend this class to implement specific functionality.

Author:
Cory Horner, Refractions Research

Field Summary
 
Fields inherited from interface org.opengis.filter.expression.Expression
NIL
 
Constructor Summary
FunctionImpl()
           
 
Method Summary
 java.lang.Object accept(org.opengis.filter.expression.ExpressionVisitor visitor, java.lang.Object extraData)
           
 java.lang.Object evaluate(java.lang.Object object)
          Default implementation simply returns the fallbackValue.
 org.opengis.filter.expression.Literal getFallbackValue()
           
 java.lang.String getName()
          Gets the name of this function.
 java.util.List<org.opengis.filter.expression.Expression> getParameters()
          Returns the function parameters.
 void setFallbackValue(org.opengis.filter.expression.Literal fallbackValue)
           
 void setName(java.lang.String name)
          Sets the name of the function.
 void setParameters(java.util.List<org.opengis.filter.expression.Expression> params)
          Sets the function parameters.
 
Methods inherited from class org.geotools.filter.expression.ExpressionAbstract
eval, eval, evaluate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opengis.filter.expression.Expression
evaluate
 

Constructor Detail

FunctionImpl

public FunctionImpl()
Method Detail

getName

public java.lang.String getName()
Gets the name of this function.

Specified by:
getName in interface org.opengis.filter.expression.Function
Returns:
the name of the function.

setName

public void setName(java.lang.String name)
Sets the name of the function.


getParameters

public java.util.List<org.opengis.filter.expression.Expression> getParameters()
Returns the function parameters.

Specified by:
getParameters in interface org.opengis.filter.expression.Function

evaluate

public java.lang.Object evaluate(java.lang.Object object)
Default implementation simply returns the fallbackValue.

Please override this method to produce a value based on the provided arguments.

Specified by:
evaluate in interface org.opengis.filter.expression.Expression
Overrides:
evaluate in class ExpressionAbstract
Parameters:
object - Object being evaluated; often a Feature
Returns:
value for the provided object

setParameters

public void setParameters(java.util.List<org.opengis.filter.expression.Expression> params)
Sets the function parameters.


setFallbackValue

public void setFallbackValue(org.opengis.filter.expression.Literal fallbackValue)

getFallbackValue

public org.opengis.filter.expression.Literal getFallbackValue()
Specified by:
getFallbackValue in interface org.opengis.filter.expression.Function

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


Copyright © 1996-2010 Geotools. All Rights Reserved.