Class CaseFunction

java.lang.Object
com.github.basking2.sdsai.itrex.functions.CaseFunction
All Implemented Interfaces:
FunctionInterface<List<Object>>, BiFunction<Iterator<?>,EvaluationContext,List<Object>>

public class CaseFunction extends Object implements FunctionInterface<List<Object>>
The CaseFunction takes two arguments and returns two arguments. CaseFunction takes, first, an expression that yields a boolean. Second it takes an expression that produces a result. If the first expression is true, then CaseFunction returns a list of first the true boolean and then the result of the second expression's evaluation. If the first expression is false, then CaseFunction returns a list of first the false boolean and then a null because the second expression will never be fetched, causing evaluation.