1 package com.tapina.robe.swi.clib.stdlib; 2 3 import java.util.Random; 4 5 /*** 6 * This holds a thread-specific random number generator. 7 */ 8 public class RandomState extends ThreadLocal { 9 public Random getRandom() { 10 return (Random) get(); 11 } 12 13 protected Object initialValue() { 14 return new Random(); 15 } 16 }