Class JxnD
-
- All Implemented Interfaces:
DoublePredicate
public class JxnD extends JxnFunction implements DoublePredicate
The classesJxnF
,JxnF2
,JxnI
,JxnL
andJxnD
together implement all interfaces of packagejava.util.function
forjava.util.stream
. This allows to explore and use java → aggregate operations interactively from JXN.JxnF
implements all single or zero parameter methods,JxnF2
all double parameter methods andJxnI
,JxnL
andJxnD
methods incompatible withPredicate
.- See Also:
- AggregateOperations_Demo.jxn
-
-
Constructor Summary
Constructors Constructor Description JxnD(JxnFunction f)
ConstructsJxnD
from 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 Object
exec(Object[] args)
Mapsargs
to$_
and the names passed to the constructor viaparameterNames
.protected Object
execute(Object arg)
boolean
test(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)
ConstructsJxnD
from an already definedJxnFunction f
.
Can be used, iff
is 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:JxnFunction
Mapsargs
to$_
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:
exec
in classJxnFunction
-
test
public boolean test(double value)
- Specified by:
test
in interfaceDoublePredicate
-
-