Choose a random value from an indexed sequence of values.
Choose a random value from an indexed sequence of values.
the type of the elements in the sequent
the sequence
a random value from the sequence
Choose a random value from an array of values.
Choose a random value from an array of values.
the type of the elements in the sequent
the array
a random value from the array
Return a random integer between low
and high
, inclusive.
Return a random integer between low
and high
, inclusive. If low
and high
are identical, low
is returned.
the lowest number
the highest number
an integer in the range [low, high]
.
IllegalArgumentException
if low
is greater than high
.
Return a random string.
Return a random string. This method is similar to Random.nextString()
,
except that it allows you to control the set of characters that are
allowed to be in the returned string. The set of characters defaults to
ASCII alphanumerics.
the size of the string to return
the set of legal characters
a random string, drawn from the supplied characters, of the specified length
The trait that implements the actual random utility methods.