|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjartege.RandomValue
This class allows one to choose random values of primitive types.
Method Summary | |
static boolean |
booleanValue()
Random value of type boolean. |
static byte |
byteValue()
Random value of type byte. |
static byte |
byteValue(byte max)
Random value of type byte in range [0, max]. |
static byte |
byteValue(byte[] array)
Random value of type byte chosen in the specified array of bytes. |
static byte |
byteValue(byte min,
byte max)
Random value of type byte in range [min, max]. |
static char |
charValue()
Random value of type char. |
static char |
charValue(char max)
Random value of type char in range [0, max]. |
static char |
charValue(char[] array)
Random value of type char chosen in the specified array. |
static char |
charValue(char min,
char max)
Random value of type char in range [min, max]. |
static double |
doubleValue(double max)
Random double value in range [0, max]. |
static double |
doubleValue(double min,
double max)
Random double value in range [min, max]. |
static float |
floatValue(float max)
Random float value in range [0, max]. |
static float |
floatValue(float min,
float max)
Random float value in range [min, max]. |
static int |
intValue()
Random value of type int. |
static int |
intValue(int max)
Random value of type int in range [0, max]. |
static int |
intValue(int[] array)
Random value chosen in an array of int. |
static int |
intValue(int min,
int max)
Random value of type int in range [min, max]. |
static long |
longValue()
Random value of type long. |
static long |
longValue(long max)
Random value of type long. |
static long |
longValue(long[] array)
Random value chosen in an array of long. |
static long |
longValue(long min,
long max)
Random value of type long. |
static double |
nonUniformDoubleValue()
Random value of type double. |
static double |
nonUniformDoubleValue(double max)
Random value of type double in range [0, max]. |
static double |
nonUniformDoubleValue(double min,
double max)
Random value of type double in range [min, max]. |
static float |
nonUniformFloatValue()
Random value of type float. |
static float |
nonUniformFloatValue(float max)
Random value of type float in range [0, max]. |
static float |
nonUniformFloatValue(float min,
float max)
Random value of type float in range [min, max]. |
static java.lang.Object |
oneObject(java.util.Collection coll)
Random object chosen in the specified collection. |
static char |
printableCharValue()
Random value of printable character (in range [32, 127]). |
static char |
printableCharValue(char max)
Random value of printable character in range [32, max]. |
static char |
printableCharValue(char min,
char max)
Random value of printable character in range [min, max]. |
static java.lang.String |
printableStringValue()
Random String of printable characters. |
static java.lang.String |
printableStringValue(short min,
short max)
Random String of printable characters of length in range [min, max]. |
static short |
shortValue()
Random value of type short. |
static short |
shortValue(short max)
Random value of type short in range [0, max]. |
static short |
shortValue(short[] array)
Random value chosen in an array of short. |
static short |
shortValue(short min,
short max)
Random value of type short in range [min, max]. |
static java.lang.String |
stringValue()
Random String. |
static java.lang.String |
stringValue(short min,
short max)
Random String of printable characters of length in range [min, max]. |
static java.lang.String |
stringValue(java.lang.String[] array)
Random string chosen in an array of String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static boolean booleanValue()
public static byte byteValue()
public static byte byteValue(byte max)
requires 0 <= max ; ensures 0 <= \result && \result <= max ;
public static byte byteValue(byte min, byte max)
requires min <= max ; ensures min <= \result && \result <= max ;
public static byte byteValue(byte[] array)
requires array != null && array.length != 0 ; ensures (\exists int i ; 0 <= i && i < array.length ; \result == array[i]) ;
public static char charValue()
public static char charValue(char max)
requires 0 <= max ; ensures 0 <= \result && \result <= max ;
public static char charValue(char min, char max)
requires min <= max ; ensures min <= \result && \result <= max ;
public static char charValue(char[] array)
requires array != null && array.length != 0 ; ensures (\exists int i ; 0 <= i && i < array.length ; \result == array[i]) ;
public static char printableCharValue()
ensures 32 <= \result && \result <= 127 ;
public static char printableCharValue(char max)
requires 32 <= max && max <= 127 ; ensures 32 <= \result && \result <= max ;
public static char printableCharValue(char min, char max)
requires 32 <= min && min <= max && max <= 127 ; ensures min <= \result && \result <= max ;
public static double nonUniformDoubleValue(double min, double max)
requires min <= max ; ensures min <= \result && \result <= max ;
public static double nonUniformDoubleValue(double max)
requires max >= 0 ; ensures 0 <= \result && \result <= max ;
public static double nonUniformDoubleValue()
public static double doubleValue(double min, double max)
requires min <= max ; ensures min <= \result && \result <= max ;
public static double doubleValue(double max)
requires max >= 0 ; ensures 0 <= \result && \result <= max ;
public static int intValue()
public static int intValue(int[] array)
requires array != null && array.length != 0 ; ensures (\exists int i ; 0 <= i && i < array.length ; \result == array[i]) ;
public static int intValue(int min, int max)
requires min <= max ; ensures min <= \result && \result <= max ;
public static int intValue(int max)
requires 0 <= max ; ensures 0 <= \result && \result <= max ;
public static long longValue()
public static long longValue(long max)
requires 0 <= max ; ensures 0 <= \result && \result <= max ;
public static long longValue(long min, long max)
requires min <= max ; ensures min <= \result && \result <= max ;
public static long longValue(long[] array)
requires array != null && array.length != 0 ; ensures (\exists int i ; 0 <= i && i < array.length ; \result == array[i]) ;
public static short shortValue()
public static short shortValue(short min, short max)
requires min <= max ; ensures min <= \result && \result <= max ;
public static short shortValue(short max)
requires 0 <= max ; ensures 0 <= \result && \result <= max ;
public static short shortValue(short[] array)
requires array != null && array.length != 0 ; ensures (\exists int i ; 0 <= i && i < array.length ; \result == array[i]) ;
public static float nonUniformFloatValue(float min, float max)
requires min <= max ; ensures min <= \result && \result <= max ;
public static float nonUniformFloatValue(float max)
requires max >= 0 ; ensures 0 <= \result && \result <= max ;
public static float nonUniformFloatValue()
public static float floatValue(float min, float max)
requires min <= max ; ensures min <= \result && \result <= max ;
public static float floatValue(float max)
requires max >= 0 ; ensures 0 <= \result && \result <= max ;
public static java.lang.String stringValue(java.lang.String[] array)
requires array != null && array.length != 0 ; ensures (\exists int i ; 0 <= i && i < array.length ; \result == array[i]) ;
public static java.lang.String stringValue()
public static java.lang.String stringValue(short min, short max)
requires 0 <= min && min <= max ; ensures min <= \result.length() && \result.length() <= max ;
public static java.lang.String printableStringValue()
public static java.lang.String printableStringValue(short min, short max)
requires 0 <= min && min <= max ; ensures min <= \result.length() && \result.length() <= max ; ensures (\forall int i ; 0 <= i && i < \result.length() ; 32 <= \result.charAt(i) && \result.charAt(i) <= 127) ;
public static java.lang.Object oneObject(java.util.Collection coll)
requires coll != null && coll.size() != 0 ; ensures coll.contains(\result) ;
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |