Class JxnD
-
- All Implemented Interfaces:
DoublePredicate
public class JxnD extends JxnFunction implements DoublePredicate
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 JxnD(JxnFunction f)ConstructsJxnDfrom an already definedJxnFunction f.JxnD(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(double value)-
Methods inherited from interface java.util.function.DoublePredicate
and, negate, or
-
Methods inherited from class JxnFunction
getArityLenience, getDebug, getShowConditional, getShowInternalResults, setArityLenience, setDebug, setShowConditional, setShowInternalResults, toString
-
-
-
-
Constructor Detail
-
JxnD
public JxnD(JxnFunction f)
ConstructsJxnDfrom an already definedJxnFunction f.
Can be used, iffis defined using jxn special commands:#function f ... #endfunction- See Also:
JxnF2(JxnFunction)
-
JxnD
public JxnD(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(double value)
- Specified by:
testin interfaceDoublePredicate
-
-