com.rubecula.util.random
Class RandomLogged

java.lang.Object
  extended by java.util.Random
      extended by com.rubecula.util.random.RandomLogged
All Implemented Interfaces:
Peekable, java.io.Serializable, org.apache.commons.math.random.RandomGenerator

public class RandomLogged
extends java.util.Random
implements org.apache.commons.math.random.RandomGenerator, Peekable

TODO this class is obsolete.

Author:
Robin Hillyard
See Also:
Serialized Form

Field Summary
protected static org.apache.commons.logging.Log LOG
          The logger for this class.
 
Constructor Summary
RandomLogged()
           
RandomLogged(long seed)
           
 
Method Summary
protected  int next(int bits)
           
 int peek(int bits)
           
 int peekInt()
           
 int peekInt(int n)
           
 void setSeed(long seed)
           
 
Methods inherited from class java.util.Random
nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.math.random.RandomGenerator
nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong
 

Field Detail

LOG

protected static final org.apache.commons.logging.Log LOG
The logger for this class.

Constructor Detail

RandomLogged

public RandomLogged()

RandomLogged

public RandomLogged(long seed)
Parameters:
seed -
Method Detail

peek

public int peek(int bits)
Parameters:
bits -
Returns:
an incorrect value

peekInt

public int peekInt()
Specified by:
peekInt in interface Peekable
Returns:
the value that will be returned by the next call to nextInt()

peekInt

public int peekInt(int n)
Specified by:
peekInt in interface Peekable
Parameters:
n -
Returns:
the value that will be returned by the next call of nextInt(n).
See Also:
Peekable.peekInt(int)

setSeed

public void setSeed(long seed)
Specified by:
setSeed in interface org.apache.commons.math.random.RandomGenerator
Overrides:
setSeed in class java.util.Random
See Also:
Random.setSeed(long)

next

protected int next(int bits)
Overrides:
next in class java.util.Random


Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.