Package org.geotools.filter.expression
Class InternalVolatileFunction
- Object
-
- ExpressionAbstract
-
- FunctionImpl
-
- InternalVolatileFunction
-
- All Implemented Interfaces:
Expression,Function,InternalFunction,VolatileFunction
public abstract class InternalVolatileFunction extends FunctionImpl implements InternalFunction, VolatileFunction
A base class functions (i.e. anonymous inner classes) that are bothvolatile(i.e. explicitly stating evaluation needs to happen for each object in the collection being traversed) andinternal(i.e. are not subject of SPI lookup, such as anonymous inner classes).- Since:
- 9.0
-
-
Field Summary
-
Fields inherited from class FunctionImpl
functionName
-
Fields inherited from interface Expression
NIL
-
-
Constructor Summary
Constructors Constructor Description InternalVolatileFunction()InternalVolatileFunction(String name)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description InternalFunctionduplicate(Expression... parameters)This default implementation just returnsthisif the number of expected parameters is zero, otherwise throws anIllegalArgumentException.abstract Objectevaluate(Object object)Default implementation simply returns the fallbackValue.-
Methods inherited from class FunctionImpl
accept, dispatchArguments, equals, functionName, getFallbackValue, getFunctionName, getName, getParameters, getParameterValue, getParameterValue, hashCode, setFallbackValue, setName, setParameters, toString
-
Methods inherited from class ExpressionAbstract
evaluate
-
Methods inherited from interface Expression
accept, evaluate
-
Methods inherited from interface Function
getFallbackValue, getFunctionName, getName, getParameters
-
-
-
-
Constructor Detail
-
InternalVolatileFunction
public InternalVolatileFunction()
-
InternalVolatileFunction
public InternalVolatileFunction(String name)
-
-
Method Detail
-
duplicate
public InternalFunction duplicate(Expression... parameters)
This default implementation just returnsthisif the number of expected parameters is zero, otherwise throws anIllegalArgumentException.A subclass that do expect
Expressionparameters shall override this method and return a new instance of the same kind of InternalFunction configured to work against the givenparameters.- Specified by:
duplicatein interfaceInternalFunction- Parameters:
parameters- the parameters the returned InternalFunction works on- Returns:
- a new instance of the same kind of InternalFunction that works on the given parameters
- See Also:
InternalFunction.duplicate(org.geotools.api.filter.expression.Expression[])
-
evaluate
public abstract Object evaluate(Object object)
Description copied from class:FunctionImplDefault implementation simply returns the fallbackValue.Please override this method to produce a value based on the provided arguments.
- Specified by:
evaluatein interfaceExpression- Overrides:
evaluatein classFunctionImpl- Parameters:
object- Object being evaluated; often a Feature- Returns:
- value for the provided object
-
-