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 TypeMethodDescriptionvoidapply(ArgumentStack stack) This method performs an invocation of this function object.
-
Method Details
-
apply
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):
- argument[n]
- argument[.]
- argument[2]
- argument[1]
- 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.
-