Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.arranger.jarl.util
Class RandomUtil  view RandomUtil download RandomUtil.java

java.lang.Object
  extended bycom.arranger.jarl.util.RandomUtil

public class RandomUtil
extends java.lang.Object


Field Summary
protected static java.util.Random m_random
           
 
Constructor Summary
RandomUtil()
           
 
Method Summary
static boolean getEven()
           
static double getNextRandom(double[] set)
           
static double[] getNextRandom(double[][] set)
           
static int getNextRandom(int[] set)
           
static int[] getNextRandom(int[][] set)
           
static java.lang.Object getNextRandom(java.util.List set)
           
static java.lang.Object getNextRandom(java.lang.Object[] set)
           
static double getRandom(double range)
           
static int getRandom(int range)
           
static double getRandomRange(double rangeLow, double rangeHigh)
           
static double getRandomRange(double rangeLow, double rangeHigh, double round)
           
static int getRandomRange(int rangeLow, int rangeHigh)
           
static int getRandomRange(int rangeLow, int rangeHigh, int round)
           
static boolean inRange(double odds)
          odds must be between 0 & 1
static double[] randomizeSet(double[] set)
           
static int[] randomizeSet(int[] set)
           
static java.util.List randomizeSet(java.util.List set)
           
static void setSeed(long seed)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_random

protected static java.util.Random m_random
Constructor Detail

RandomUtil

public RandomUtil()
Method Detail

setSeed

public static void setSeed(long seed)

getRandom

public static int getRandom(int range)

getRandom

public static double getRandom(double range)

getRandomRange

public static int getRandomRange(int rangeLow,
                                 int rangeHigh)

getRandomRange

public static int getRandomRange(int rangeLow,
                                 int rangeHigh,
                                 int round)

getRandomRange

public static double getRandomRange(double rangeLow,
                                    double rangeHigh)

getRandomRange

public static double getRandomRange(double rangeLow,
                                    double rangeHigh,
                                    double round)

inRange

public static boolean inRange(double odds)
odds must be between 0 & 1


getEven

public static boolean getEven()

getNextRandom

public static java.lang.Object getNextRandom(java.util.List set)

getNextRandom

public static java.lang.Object getNextRandom(java.lang.Object[] set)

getNextRandom

public static int getNextRandom(int[] set)

getNextRandom

public static int[] getNextRandom(int[][] set)

getNextRandom

public static double[] getNextRandom(double[][] set)

getNextRandom

public static double getNextRandom(double[] set)

randomizeSet

public static java.util.List randomizeSet(java.util.List set)

randomizeSet

public static double[] randomizeSet(double[] set)

randomizeSet

public static int[] randomizeSet(int[] set)