com.twitter.common.util
Class Random.Util

java.lang.Object
  extended by com.twitter.common.util.Random.Util
Enclosing interface:
Random

public static class Random.Util
extends Object


Method Summary
static Random fromSystemRandom(Random rand)
          Adapts a java.util.Random into a Random.
static Random newDefaultRandom()
          Creates a new Random based off the default system Random.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newDefaultRandom

public static Random newDefaultRandom()
Creates a new Random based off the default system Random.

Returns:
A new default Random.

fromSystemRandom

public static Random fromSystemRandom(Random rand)
Adapts a java.util.Random into a Random.

Parameters:
rand - The java.util.Random to adapt.
Returns:
A new Random.