EchoPoint
1.0

echopoint.util
Class RandKit

java.lang.Object
  extended byechopoint.util.RandKit

public class RandKit
extends java.lang.Object


Method Summary
static java.util.Calendar rand(java.util.Calendar start, java.util.Calendar end)
          Returns a new Calendar object which is between start and end
static double rand(double lo, double hi)
          get random numbers in a range, lo <= number <= hi
static int rand(int lo, int hi)
          get random numbers in a range, lo <= number <= hi
static long rand(long lo, long hi)
          get random numbers in a range, lo <= number <= hi
static boolean roll(boolean[] booleans)
          Returns a random boolean from the array of booleans
static char roll(char[] chars)
          Returns a random char from the array of chars
static double roll(double[] doubles)
          Returns a random double from the array of doubles
static float roll(float[] floats)
          Returns a random float from the array of floats
static boolean roll(int percentageChance)
          Returns true "chance" percent of the time.
static int roll(int[] ints)
          Returns a random int from the array of ints
static java.lang.Object roll(java.util.List list)
          Returns a random Object from the List of Objects
static long roll(long[] longs)
          Returns a random long from the array of longs
static java.lang.Object roll(java.lang.Object[] arr)
          Returns a random object from the array of objects
static java.lang.String roll(java.lang.String[] arrStrings)
          Returns a random String from the array of Strings
static boolean roll5050()
          Returns true of false 50 percent of the time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

rand

public static double rand(double lo,
                          double hi)
get random numbers in a range, lo <= number <= hi


rand

public static int rand(int lo,
                       int hi)
get random numbers in a range, lo <= number <= hi


rand

public static long rand(long lo,
                        long hi)
get random numbers in a range, lo <= number <= hi


rand

public static java.util.Calendar rand(java.util.Calendar start,
                                      java.util.Calendar end)
Returns a new Calendar object which is between start and end


roll

public static char roll(char[] chars)
Returns a random char from the array of chars


roll

public static double roll(double[] doubles)
Returns a random double from the array of doubles


roll

public static float roll(float[] floats)
Returns a random float from the array of floats


roll

public static int roll(int[] ints)
Returns a random int from the array of ints


roll

public static long roll(long[] longs)
Returns a random long from the array of longs


roll

public static java.lang.Object roll(java.lang.Object[] arr)
Returns a random object from the array of objects


roll

public static java.lang.String roll(java.lang.String[] arrStrings)
Returns a random String from the array of Strings


roll

public static boolean roll(boolean[] booleans)
Returns a random boolean from the array of booleans


roll

public static boolean roll(int percentageChance)
Returns true "chance" percent of the time. Of course chance should be an integer between 0 and 100.


roll

public static java.lang.Object roll(java.util.List list)
Returns a random Object from the List of Objects


roll5050

public static boolean roll5050()
Returns true of false 50 percent of the time


EchoPoint
1.0