Class ListFunction
java.lang.Object
com.github.basking2.sdsai.itrex.functions.ListFunction
- All Implemented Interfaces:
FunctionInterface<List<Object>>
,BiFunction<Iterator<?>,
EvaluationContext, List<Object>>
A function that materializes an iterator into a list and returns it.
This is useful in situation where you want to set a variable using the "set" function
to return a list.
Also, sometimes you want to defer evaluation of a list. In such situations you can make the first
element be the "list" function which simply returns the following arguments.
-
Constructor Details
-
ListFunction
public ListFunction()
-
-
Method Details
-
apply
public List<Object> apply(Iterator<? extends Object> objectIterator, EvaluationContext evaluationContext) - Specified by:
apply
in interfaceBiFunction<Iterator<?>,
EvaluationContext, List<Object>>
-