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 both volatile
(i.e. explicitly stating evaluation needs to happen for each object in the collection
being traversed) and internal
(i.e. are not subject of SPI lookup, such
as anonymous inner classes).
- Since:
- 9.0
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InternalVolatileFunction
public InternalVolatileFunction()
InternalVolatileFunction
public InternalVolatileFunction(String name)
duplicate
public InternalFunction duplicate(Expression... parameters)
- This default implementation just returns
this
if the number of expected parameters is
zero, otherwise throws an IllegalArgumentException
.
A subclass that do expect Expression
parameters shall override this method and return
a new instance of the same kind of InternalFunction configured to work against the given
parameters
.
- Specified by:
duplicate
in interface InternalFunction
- 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.opengis.filter.expression.Expression[])
evaluate
public abstract Object evaluate(Object object)
- Description copied from class:
FunctionImpl
- Default implementation simply returns the fallbackValue.
Please override this method to produce a value based on the
provided arguments.
- Specified by:
evaluate
in interface Expression
- Overrides:
evaluate
in class FunctionImpl
- Parameters:
object
- Object being evaluated; often a Feature
- Returns:
- value for the provided object
evaluate
public Object evaluate(Object object,
Class context)
- Description copied from class:
ExpressionAbstract
- Default implementation delegates handling of context
conversion to Value utility class.
Subclasses are expected to make use of the Value utility class
(as the easiest way to provide value morphing in confirmance with
the Filter specification).
- Specified by:
evaluate
in interface Expression
- Overrides:
evaluate
in class ExpressionAbstract
- Parameters:
object
- The object to evaluate the expression against.context
- The type of the resulting value of the expression.
- Returns:
- Evaluates the given expression based on the content of the given object an
an instance of
context
.
Copyright © 1996-2014 Geotools. All Rights Reserved.