Class TwoGeometries.WithArgument<R,G>

All Implemented Interfaces:
Serializable, Function<R,Object>, Expression<R,Object>, Optimization.OnExpression<R,Object>, FeatureExpression<R,Object>
Enclosing class:
TwoGeometries<R,G>

static final class TwoGeometries.WithArgument<R,G> extends TwoGeometries<R,G>
SQLMM spatial functions taking a single geometry operand with one argument.
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For cross-version compatibility.
      See Also:
    • argument

      final Expression<? super R,?> argument
      The first argument after the geometries.
  • Constructor Details

    • WithArgument

      WithArgument(SQLMM operation, Expression<? super R,?>[] parameters, Geometries<G> library)
      Creates a new function for geometries represented by the given parameter.
  • Method Details

    • recreate

      public Expression<R,Object> recreate(Expression<? super R,?>[] effective)
      Creates a new expression of the same type than this expression, but with an optimized geometry. The optimization may be a geometry computed immediately if all operator parameters are literals.
      Specified by:
      recreate in interface Optimization.OnExpression<R,G>
      Overrides:
      recreate in class TwoGeometries<R,G>
      Parameters:
      effective - the expressions to use as a replacement of this expression parameters.
      Returns:
      the new expression, or this if unsupported.
    • getParameters

      public List<Expression<? super R,?>> getParameters()
      Returns the sub-expressions that will be evaluated to provide the parameters to the function.
      Specified by:
      getParameters in interface Expression<R,G>
      Overrides:
      getParameters in class TwoGeometries<R,G>
      Returns:
      the sub-expressions to be evaluated, or an empty list if none.
    • apply

      public Object apply(R input)
      Evaluates the two first expressions as geometry objects, applies the operation and returns the result.
      Specified by:
      apply in interface Expression<R,G>
      Specified by:
      apply in interface Function<R,G>
      Overrides:
      apply in class TwoGeometries<R,G>
      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.