Class ExponentialFunction

All Implemented Interfaces:
Expression, Function

public class ExponentialFunction extends FunctionImpl
Generate an output by interpolating between stops just less than and just greater than the function input. The domain must be numeric.

Parameters:

  1. The interpolation input
  2. The base of the interpolation
  3. (...n) The remaining args are interpreted as pairs of stop values (input, output) for the interpolation. There must be an even number.
Author:
Jody Garnett (Boundless)
  • Field Details

  • Constructor Details

    • ExponentialFunction

      public ExponentialFunction()
  • Method Details

    • evaluate

      public 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 <T> T evaluate(Object object, Class<T> context)
      Description copied from class: ExpressionAbstract
      Default implementation delegates handling of context conversion to Converters utility class.

      Subclasses are expected to make use of the Converters utility class (as the easiest way to provide value morphing in conformance with the Filter specification).

      Specified by:
      evaluate in interface Expression
      Overrides:
      evaluate in class ExpressionAbstract
      Type Parameters:
      T - The type of the returned object.
      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.
    • getStops

      public List<ExponentialFunction.Stop> getStops(List<Expression> parameters)