Class ExtensionsConsole.PrintfFunction
- java.lang.Object
-
- com.singularsys.jep.functions.PostfixMathCommand
-
- com.singularsys.jep.functions.NaryFunction
-
- com.singularsys.extexamples.consoles.ExtensionsConsole.PrintfFunction
-
- All Implemented Interfaces:
PostfixMathCommandI
,java.io.Serializable
- Enclosing class:
- ExtensionsConsole
public class ExtensionsConsole.PrintfFunction extends NaryFunction
Class to add a print function.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, name, NaN, numberOfParameters
-
-
Constructor Summary
Constructors Constructor Description PrintfFunction()
Constructor with default System.out for output and ", " for the separator.PrintfFunction(java.lang.String sep, java.lang.String term)
Constructor with specified separator and terminator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
eval(java.lang.Object[] args)
Evaluate the function-
Methods inherited from class com.singularsys.jep.functions.NaryFunction
run
-
Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkNumberOfParameters, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString, toString
-
-
-
-
Method Detail
-
eval
public java.lang.Object eval(java.lang.Object[] args) throws EvaluationException
Description copied from class:NaryFunction
Evaluate the function- Specified by:
eval
in classNaryFunction
- Parameters:
args
- arguments to the function- Returns:
- value returned by the function
- Throws:
EvaluationException
- if the calculation cannot be performed
-
-