Class ThreadSafeRandom
- java.lang.Object
-
- com.singularsys.jep.functions.PostfixMathCommand
-
- com.singularsys.jep.functions.NullaryFunction
-
- com.singularsys.jep.misc.threadsafeeval.ThreadSafeRandom
-
- All Implemented Interfaces:
PostfixMathCommandI
,java.io.Serializable
- Direct Known Subclasses:
DirtyThreadSafeRandom
public class ThreadSafeRandom extends NullaryFunction
Random number generator using the java.util.concurrent.ThreadLocalRandomnextDouble(double)
method.- Since:
- 3.5
- See Also:
Random
,LightWeightComponentSet
, Java 7 Concurrent Random Numbers, Serialized Form
-
-
Field Summary
-
Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, name, NaN, numberOfParameters
-
-
Constructor Summary
Constructors Constructor Description ThreadSafeRandom()
-
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
-
-