Class CaseListFunction
java.lang.Object
com.github.basking2.sdsai.itrex.functions.CaseListFunction
- All Implemented Interfaces:
FunctionInterface<Object>
,BiFunction<Iterator<?>,
EvaluationContext, Object>
The `caselist` function is built to work with `case` functions, but this is not necessary.
Find will evaluate each of its arguments, in order, until it _finds_ a result.
A result is _found_ if the argument either evaluates to _true_ or is an iterable object
and its first element evaluates to _true_. In the case of an iterable element, the second
element in the iterable is returned as the actual result. In the case of a non-iterable,
then just true is returned.
If nothing is found, then null (not _false_) is returned.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapply
(Iterator<?> iterator, EvaluationContext evaluationContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiFunction
andThen
-
Constructor Details
-
CaseListFunction
public CaseListFunction()
-
-
Method Details
-
apply
- Specified by:
apply
in interfaceBiFunction<Iterator<?>,
EvaluationContext, Object>
-