|
EchoPoint API - 3.0.0b5 App Webcontainer |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectechopoint.util.RandKit
public class RandKit
| Method Summary | |
|---|---|
static Calendar |
rand(Calendar start,
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 Object[] |
rand(Object[] possibles,
Object[] destination)
This method will return a random sample of the possibles array into the destination array, without repeating any options. |
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 Object |
roll(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 Object |
roll(Object[] arr)
Returns a random object from the array of objects |
static String |
roll(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 |
|---|
public static double rand(double lo,
double hi)
public static int rand(int lo,
int hi)
public static long rand(long lo,
long hi)
public static Calendar rand(Calendar start,
Calendar end)
public static char roll(char[] chars)
public static double roll(double[] doubles)
public static float roll(float[] floats)
public static int roll(int[] ints)
public static long roll(long[] longs)
public static Object roll(Object[] arr)
public static String roll(String[] arrStrings)
public static boolean roll(boolean[] booleans)
public static boolean roll(int percentageChance)
public static Object roll(List list)
public static boolean roll5050()
public static Object[] rand(Object[] possibles,
Object[] destination)
possibles - - an array of possible choicesdestination - - the destination array for random choices
|
EchoPoint API - 3.0.0b5 App Webcontainer |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||