|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rafa.math.gen.RandomStrategy
public class RandomStrategy
This enging returns a random value.
Field Summary | |
---|---|
protected long |
seed
|
Constructor Summary | |
---|---|
RandomStrategy()
|
|
RandomStrategy(long seed)
|
Method Summary | |
---|---|
java.util.List<? extends java.lang.Number> |
generate(int index)
Generates new numbers. |
long |
getSeed()
|
java.lang.Number |
getValue(int index)
Deprecated. |
void |
reset()
Resets the strategy to its initial state. |
void |
setSeed(long seed)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected long seed
Constructor Detail |
---|
public RandomStrategy()
public RandomStrategy(long seed)
Method Detail |
---|
@Deprecated public java.lang.Number getValue(int index)
public java.util.List<? extends java.lang.Number> generate(int index) throws java.lang.Exception
GeneratorStrategy
generate
in interface GeneratorStrategy
index
- the index of the value within the strategy output. Note that
it can be ignored by the implementation, if not needed.
null
if none was generated.
java.lang.Exception
public void reset()
GeneratorStrategy
reset
in interface GeneratorStrategy
public long getSeed()
public void setSeed(long seed)
seed
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |