Class RandomGenerator
java.lang.Object
net.flectone.pulse.util.generator.RandomGenerator
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
RandomGenerator
@Inject public RandomGenerator()
-
-
Method Details
-
nextInt
public int nextInt(int start, int end) Returns a random integer between the specified start (inclusive) and end (exclusive).- Parameters:
start- the lower bound (inclusive)end- the upper bound (exclusive)- Returns:
- a random integer in range [start, end), or 0 if start > end
-
nextInt
public int nextInt(int bound) Returns a random integer between 0 (inclusive) and the specified bound (exclusive).- Parameters:
bound- the upper bound (exclusive)- Returns:
- a random integer in range [0, bound)
-