net.pakl.rl
Class RandomPerThread

java.lang.Object
  extended by java.lang.ThreadLocal
      extended by net.pakl.rl.RandomPerThread
All Implemented Interfaces:
java.io.Serializable

public class RandomPerThread
extends java.lang.ThreadLocal
implements java.io.Serializable

This class ensures that each thread that invokes it will get a unique random number generator. I believe this was done so that different runs would result in the same exact values (replicate).

See Also:
Serialized Form

Constructor Summary
RandomPerThread()
           
 
Method Summary
 java.lang.Object initialValue()
           
 void setRandomSeed(long x)
           
 
Methods inherited from class java.lang.ThreadLocal
get, remove, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomPerThread

public RandomPerThread()
Method Detail

setRandomSeed

public void setRandomSeed(long x)

initialValue

public java.lang.Object initialValue()
Overrides:
initialValue in class java.lang.ThreadLocal