Package org.apache.sis.filter
Interface Expression<R,V>
- Type Parameters:
R
- the type of resources (e.g.Feature
) used as inputs.V
- the type of values computed by the expression.
- All Superinterfaces:
Function<R,
V>
- All Known Subinterfaces:
Optimization.OnExpression<R,
V>
A literal or a named procedure that performs a distinct computation.
Upcoming API change
This is a placeholder for a GeoAPI 3.1 interface not yet released. In a future version, all usages of this interface may be replaced by an interface of the same name but in the
This is a placeholder for a GeoAPI 3.1 interface not yet released. In a future version, all usages of this interface may be replaced by an interface of the same name but in the
org.opengis.filter
package
instead of org.apache.sis.filter
.
-
Method Summary
Modifier and TypeMethodDescriptionEvaluates the expression value based on the content of the given object.Returns the name of the function to be called.List<Expression<? super R,
?>> Returns the list sub-expressions that will be evaluated to provide the parameters to the function.<N> Expression<R,
N> toValueType
(Class<N> type) Returns an expression doing the same evaluation than this method, but returning results as values of the specified type.
-
Method Details
-
getFunctionName
ScopedName getFunctionName()Returns the name of the function to be called.- Returns:
- name of the function to be called.
-
getParameters
List<Expression<? super R,?>> getParameters()Returns the list sub-expressions that will be evaluated to provide the parameters to the function.- Returns:
- the sub-expressions to be evaluated, or an empty list if none.
-
apply
Evaluates the expression value based on the content of the given object.- Specified by:
apply
in interfaceFunction<R,
V> - Parameters:
input
- the object to be evaluated by the expression. Can benull
if this expression allows null values.- Returns:
- value computed by the expression.
- Throws:
NullPointerException
- ifinput
is null and this expression requires non-null values.IllegalArgumentException
- if the expression can not be applied on the given object.
-
toValueType
Returns an expression doing the same evaluation than this method, but returning results as values of the specified type.- Type Parameters:
N
- compile-time value oftype
.- Parameters:
type
- desired type of expression results.- Returns:
- expression doing the same operation this this expression but with results of the specified type.
- Throws:
ClassCastException
- if the specified type is not a target type supported by implementation.
-