public class Randomness extends Object implements Serializable
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
choice(Collection<T> set)
choice
|
static <T> T |
choice(List<T> list)
choice
|
static <T> T |
choice(T... elements)
choice
|
static Randomness |
getInstance()
Getter for the field
instance. |
static long |
getSeed()
Getter for the field
seed. |
static boolean |
nextBoolean()
nextBoolean
|
static byte |
nextByte()
nextByte
|
static char |
nextChar()
nextChar
|
static double |
nextDouble()
returns a randomly generated double in the range [0,1]
|
static float |
nextFloat()
nextFloat
|
static double |
nextGaussian() |
static int |
nextInt()
nextInt
|
static int |
nextInt(int max)
nextInt
|
static int |
nextInt(int min,
int max)
nextInt
|
static long |
nextLong()
nextLong
|
static short |
nextShort()
nextShort
|
static String |
nextString(int length)
nextString
|
static void |
setSeed(long seed)
Setter for the field
seed. |
static void |
shuffle(List<?> list)
shuffle
|
public static Randomness getInstance()
Getter for the field instance.
Randomness object.public static boolean nextBoolean()
nextBoolean
public static int nextInt(int max)
nextInt
max - a int.public static double nextGaussian()
public static int nextInt(int min,
int max)
nextInt
min - a int.max - a int.public static int nextInt()
nextInt
public static char nextChar()
nextChar
public static short nextShort()
nextShort
public static long nextLong()
nextLong
public static byte nextByte()
nextByte
public static double nextDouble()
returns a randomly generated double in the range [0,1]
public static float nextFloat()
nextFloat
public static void setSeed(long seed)
Setter for the field seed.
seed - a long.public static long getSeed()
Getter for the field seed.
public static <T> T choice(List<T> list)
choice
T - a T object.list - a List object.null if list is empty.public static <T> T choice(Collection<T> set)
choice
T - a T object.set - a Collection object.null if set is empty.public static <T> T choice(T... elements)
choice
T - a T object.elements - a T object.null if elements.length is zero.Copyright © 2010–2017 EvoSuite. All rights reserved.