Class JxnL
-
- All Implemented Interfaces:
LongPredicate
public class JxnL extends JxnFunction implements LongPredicate
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 JxnL(JxnFunction f)
ConstructsJxnL
from 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 Object
exec(Object[] args)
Mapsargs
to$_
and the names passed to the constructor viaparameterNames
.protected Object
execute(Object arg)
boolean
test(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)
ConstructsJxnL
from an already definedJxnFunction f
.
Can be used, iff
is 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: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(long value)
- Specified by:
test
in interfaceLongPredicate
-
-