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
  • Constructor Details

    • InternalVolatileFunction

      public InternalVolatileFunction()
    • InternalVolatileFunction

      public InternalVolatileFunction(String name)
  • Method Details

    • 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:
    • 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