diff --git a/src/java/com/samskivert/util/RandomUtil.java b/src/java/com/samskivert/util/RandomUtil.java
index 55ade764..df1fe167 100644
--- a/src/java/com/samskivert/util/RandomUtil.java
+++ b/src/java/com/samskivert/util/RandomUtil.java
@@ -44,7 +44,19 @@ public class RandomUtil
*/
public static int getInt (int high)
{
- return rand.nextInt(high);
+ return getInt(high, rand);
+ }
+
+ /**
+ * Returns a pseudorandom, uniformly distributed int value between 0 (inclusive)
+ * and the specified value (exclusive).
+ *
+ * @param high the high value limiting the random number sought.
+ * @param r the random number generator to use
+ */
+ public static int getInt (int high, Random r)
+ {
+ return r.nextInt(high);
}
/**
@@ -97,12 +109,32 @@ public class RandomUtil
*
| 0 | 1/8th of the time |
| 1 | never |
| 2 | 3/8th of the time |
| 3 | half of the time |