/** * Returns a pseudorandom, uniformly distributed value between the * given least value (inclusive) and bound (exclusive). * * @param least the least value returned * @param bound the upper bound (exclusive) * @return the next value * @throws IllegalArgumentException if least greater than or equal * to bound */ public long nextLong(long least, long bound) { if (least >= bound) throw new IllegalArgumentException(); return nextLong(bound - least) + least; }
/** * Returns a pseudorandom, uniformly distributed value between the * given least value (inclusive) and bound (exclusive). * * @param least the least value returned * @param bound the upper bound (exclusive) * @return the next value * @throws IllegalArgumentException if least greater than or equal * to bound */ public long nextLong(long least, long bound) { if (least >= bound) throw new IllegalArgumentException(); return nextLong(bound - least) + least; }
public long op() { return ThreadLocalRandom.current().nextLong(range) + least; } }
public long op() { return ThreadLocalRandom.current().nextLong(); } }
public long op() { return ThreadLocalRandom.current().nextLong(range) + least; } }
public long op() { return ThreadLocalRandom.current().nextLong(); } }
public long op() { return ThreadLocalRandom.current().nextLong(bound); } }
public long op() { return ThreadLocalRandom.current().nextLong(bound); } }