int value between 0 (inclusive)
+ * and the specified value (exclusive).
+ *
+ * @param high the high value limiting the random number sought.
+ *
+ * @throws IllegalArgumentException if high is not positive.
+ */
+ public int getInt (int high)
+ {
+ return _r.nextInt(high);
+ }
+
+ /**
+ * Returns a pseudorandom, uniformly distributed int value between
+ * low (inclusive) and high (exclusive).
+ *
+ * @throws IllegalArgumentException if high - low is not positive.
+ */
+ public int getInRange (int low, int high)
+ {
+ return low + _r.nextInt(high - low);
+ }
+
+ /**
+ * Returns a pseudorandom, uniformly distributed float value between 0.0 (inclusive) and the
+ * specified value (exclusive).
+ *
+ * @param high the high value limiting the random number sought.
+ */
+ public float getFloat (float high)
+ {
+ return _r.nextFloat() * high;
+ }
+
+ /**
+ * Returns a pseudorandom, uniformly distributed float value between
+ * low (inclusive) and high (exclusive).
+ */
+ public float getInRange (float low, float high)
+ {
+ return low + (_r.nextFloat() * (high - low));
+ }
+
+ /**
+ * Returns true approximately one in n times.
+ */
+ public boolean getChance (int n)
+ {
+ return (0 == _r.nextInt(n));
+ }
+
+ /**
+ * Has a probability p of returning true.
+ */
+ public boolean getProbability (float p)
+ {
+ return _r.nextFloat() < p;
+ }
+
+ /**
+ * Returns true or false with approximately even distribution.
+ */
+ public boolean getBoolean ()
+ {
+ return _r.nextBoolean();
+ }
+
+ /**
+ * Returns a key from the supplied map according to a probability computed as
+ * the key's value divided by the total of all the key's values.
+ *
+ * @throws NullPointerException if the map is null.
+ * @throws IllegalArgumentException if the sum of the weights is not positive.
+ */
+ public ifEmpty
+ * if it is empty.
+ *
+ * Implementation note: because the total size of the Iterator is not known,
+ * the random number generator is queried after the second element and every element
+ * thereafter.
+ *
+ * @throws NullPointerException if the iterator is null.
+ */
+ public Implementation note: optimized implementations are used if the Iterable
+ * is a List or Collection. Otherwise, it behaves as if calling {@link #pick(Iterator)} with
+ * the Iterable's Iterator.
+ *
+ * @throws NullPointerException if the iterable is null.
+ */
+ public Implementation note: optimized implementations are used if the Iterable
+ * is a List or Collection. Otherwise, two Iterators are created from the Iterable
+ * and a random number is generated after the second element and all beyond.
+ *
+ * @throws NullPointerException if the iterable is null.
+ * @throws UnsupportedOperationException if the iterable is unmodifiable or its Iterator
+ * does not support {@link Iterator#remove()}.
+ */
+ public ifEmpty
+ * if it is empty.
+ *
+ * ifEmpty
+ * if it is empty.
+ *
+ *