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:
FeatureExpression<R,V>, Literal<R,V>, Optimization.OnExpression<R,V>, ValueReference<R,V>
All Known Implementing Classes:
ArithmeticFunction, ArithmeticFunction.Add, ArithmeticFunction.Divide, ArithmeticFunction.Multiply, ArithmeticFunction.Subtract, AssociationValue, ConvertFunction, FilterExpressions.Element, FunctionWithSRID, GeometryConstructor, GeometryConverter, GeometryParser, LeafExpression, LeafExpression.Literal, LeafExpression.Transformed, OneGeometry, OneGeometry.WithArgument, PropertyValue, PropertyValue.AsObject, PropertyValue.CastedAndConverted, PropertyValue.Converted, SpatialFunction, ST_FromBinary, ST_FromText, ST_Point, ST_Transform, TwoGeometries, TwoGeometries.WithArgument

public interface Expression<R,V> extends Function<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 org.opengis.filter package instead of org.apache.sis.filter.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(R input)
    Evaluates the expression value based on the content of the given object.
    org.opengis.util.ScopedName
    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.

    Methods inherited from interface java.util.function.Function

    andThen, compose
  • Method Details

    • getFunctionName

      org.opengis.util.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

      V apply(R input)
      Evaluates the expression value based on the content of the given object.
      Specified by:
      apply in interface Function<R,V>
      Parameters:
      input - the object to be evaluated by the expression. Can be null if this expression allows null values.
      Returns:
      value computed by the expression.
      Throws:
      NullPointerException - if input is null and this expression requires non-null values.
      IllegalArgumentException - if the expression can not be applied on the given object.
    • toValueType

      <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.
      Type Parameters:
      N - compile-time value of type.
      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.