Class JxnL
-
- All Implemented Interfaces:
LongPredicate
public class JxnL extends JxnFunction implements LongPredicate
The classesJxnF,JxnF2,JxnI,JxnLandJxnDtogether implement all interfaces of packagejava.util.functionforjava.util.stream. This allows to explore and use java → aggregate operations interactively from JXN.JxnFimplements all single or zero parameter methods,JxnF2all double parameter methods andJxnI,JxnLandJxnDmethods incompatible withPredicate.- See Also:
- AggregateOperations_Demo.jxn
-
-
Constructor Summary
Constructors Constructor Description JxnL(JxnFunction f)ConstructsJxnLfrom an already definedJxnFunction f.JxnL(KmgFormelInterpreter fi, String cmd)Calls constructorJxnFunction( fi, cmd ).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Objectexec(Object[] args)Mapsargsto$_and the names passed to the constructor viaparameterNames.protected Objectexecute(Object arg)booleantest(long value)-
Methods inherited from class JxnFunction
getArityLenience, getDebug, getShowConditional, getShowInternalResults, setArityLenience, setDebug, setShowConditional, setShowInternalResults, toString
-
Methods inherited from interface java.util.function.LongPredicate
and, negate, or
-
-
-
-
Constructor Detail
-
JxnL
public JxnL(JxnFunction f)
ConstructsJxnLfrom an already definedJxnFunction f.
Can be used, iffis defined using jxn special commands:#function f ... #endfunction- See Also:
JxnF2(JxnFunction)
-
JxnL
public JxnL(KmgFormelInterpreter fi, String cmd)
Calls constructorJxnFunction( fi, cmd ).- Parameters:
cmd- statement_sequence (one or more statements separated by';') or #filename[.jxn]. (Note: jxn does not support{…}blocks as possible in java → lambda expressions)- See Also:
JxnF2(KmgFormelInterpreter,java.lang.String)
-
-
Method Detail
-
exec
protected Object exec(Object[] args)
Description copied from class:JxnFunctionMapsargsto$_and the names passed to the constructor viaparameterNames.
Example:
fn = @JxnFunction( … ) !calls a constructor to create a function instancefn
:
fn( arg1, arg2, ..., argN ) !⇒ jxn internally callsfn.exec( { arg1, arg2, ..., argN } )- Overrides:
execin classJxnFunction
-
test
public boolean test(long value)
- Specified by:
testin interfaceLongPredicate
-
-