Class AbstractFunction2<T1,T2,R>

java.lang.Object
com.github.basking2.sdsai.itrex.functions.AbstractFunction2<T1,T2,R>
All Implemented Interfaces:
FunctionInterface<R>, BiFunction<Iterator<?>,EvaluationContext,R>
Direct Known Subclasses:
FoldLeftFunction, JavaFunction, SetFunction, StringSplitFunction, UpdateFunction

public abstract class AbstractFunction2<T1,T2,R> extends Object implements FunctionInterface<R>
A function that takes 2 arguments of given types.
  • Constructor Details

    • AbstractFunction2

      public AbstractFunction2()
  • Method Details

    • apply

      public R apply(Iterator<?> iterator, EvaluationContext evaluationContext)
      Specified by:
      apply in interface BiFunction<T1,T2,R>
    • applyImpl

      protected abstract R applyImpl(T1 t1, T2 t2, Iterator<?> rest, EvaluationContext context)
      Overriders of this class should implement this.
      Parameters:
      t1 - The desired parameter.
      t2 - The desired parameter.
      rest - Any unused arguments.
      context - The evaluation context.
      Returns:
      The produced object.