MjSip Stack
v1.6

org.zoolu.tools
Class Random

java.lang.Object
  |
  +--org.zoolu.tools.Random

public class Random
extends java.lang.Object

Class Random collects some static methods for generating random numbers and other stuff.


Constructor Summary
Random()
           
 
Method Summary
static boolean nextBoolean()
          Returns a random boolean
static byte[] nextBytes(int len)
          Returns a random array of bytes
static java.lang.String nextHexString(int len)
          Returns a random hexadecimal String
static int nextInt()
          Returns a random integer
static int nextInt(int n)
          Returns a random integer between 0 and n-1
static long nextLong()
          Returns a random long
static java.lang.String nextNumString(int len)
          Returns a random numeric String
static java.lang.String nextString(int len)
          Returns a random String
static void setSeed(long seed)
          Sets the seed of this random number generator using a single long seed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Random

public Random()
Method Detail

setSeed

public static void setSeed(long seed)
Sets the seed of this random number generator using a single long seed

nextInt

public static int nextInt()
Returns a random integer

nextInt

public static int nextInt(int n)
Returns a random integer between 0 and n-1

nextLong

public static long nextLong()
Returns a random long

nextBoolean

public static boolean nextBoolean()
Returns a random boolean

nextBytes

public static byte[] nextBytes(int len)
Returns a random array of bytes

nextString

public static java.lang.String nextString(int len)
Returns a random String

nextNumString

public static java.lang.String nextNumString(int len)
Returns a random numeric String

nextHexString

public static java.lang.String nextHexString(int len)
Returns a random hexadecimal String

MjSip Stack
v1.6