public class PseudoRandom extends Object
Constructor and Description |
---|
PseudoRandom(int range)
Create a pseudo random number generator which will visit each integer in
a half-open range.
|
PseudoRandom(int range,
int next)
Create a pseudo random number generator which will visit each integer in
a half-open range.
|
public PseudoRandom(int range, int next)
range
- The exclusive upper bound of the half-open range (0:range].next
- The next number to visit in (0:range].public PseudoRandom(int range)
1
.range
- The exclusive upper bound of the half-open range (0:range].public int next()
public int nextInt(int range)
range
- The range.IllegalArgumentException
- if the range is negative.IllegalStateException
- if the range is greater than the range specified to the
constructor (ie., the generated could not produce all numbers
in the given range).public int next(int prev)
prev
- The "previous" value.public void nextBytes(byte[] key, int prev)
public void nextBytes(byte[] key)
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.