Package com.singularsys.jep.functions
Class Random
- java.lang.Object
-
- com.singularsys.jep.functions.PostfixMathCommand
-
- com.singularsys.jep.functions.NullaryFunction
-
- com.singularsys.jep.functions.Random
-
- All Implemented Interfaces:
PostfixMathCommandI
,java.io.Serializable
- Direct Known Subclasses:
DirtyRandom
public class Random extends NullaryFunction
Encapsulates the Math.random() function.For multiple thread usage see
ThreadSafeRandom
- See Also:
Math.random()
, Serialized Form
-
-
Field Summary
-
Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, name, NaN, numberOfParameters
-
-
Constructor Summary
Constructors Constructor Description Random()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
eval()
Evaluate the function-
Methods inherited from class com.singularsys.jep.functions.NullaryFunction
instanceOf, 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() throws EvaluationException
Description copied from class:NullaryFunction
Evaluate the function- Specified by:
eval
in classNullaryFunction
- Returns:
- value of the function
- Throws:
EvaluationException
-
-