Package autumn.lang

Interface Functor

All Known Subinterfaces:
DefinedFunctor, Delegate, Lambda, TypedFunctor
All Known Implementing Classes:
AbstractDefinedFunctor, AbstractDelegate, AbstractFunctor, AbstractLambda, AbstractTypedFunctor, Action, Function0, Function1, Function2, Function3, Function4, Function5, Function6, Function7, Function8, Function9, ModuleDelegate, Ordering, Predicate, ProxyHandler

public interface Functor
An instance of this interface is a function object.
Author:
Mackenzie High
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method performs an invocation of this function object.
  • Method Details

    • apply

      void apply(ArgumentStack stack) throws Throwable
      This method performs an invocation of this function object.

      Programmers should not call this method directly. Instead, for convenience, call this method indirectly via (F::apply List).

      Calling Convention from top to bottom (n >= 0):

      1. argument[n]
      2. argument[.]
      3. argument[2]
      4. argument[1]
      5. argument[0]

      The argument stack will be cleared and then the result will be pushed onto it. If the functor does not return a value, then the stack will remain empty.

      Parameters:
      stack - is a stack containing the arguments being passed to this functor.
      Throws:
      Throwable - in order to propagate exceptions thrown by the functor.