Class RandomUtils
java.lang.Object
io.github.projectunified.cronutils.utils.RandomUtils
Utility class for random number generation in cron expressions.
This is used primarily for OpenBSD-style random intervals using the '~' character.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
RandomUtils
public RandomUtils() -
RandomUtils
-
-
Method Details
-
nextInt
public int nextInt(int bound) Generate a random integer between 0 (inclusive) and bound (exclusive)- Parameters:
bound- the upper bound (exclusive)- Returns:
- random integer
-
nextInt
public int nextInt(int min, int max) Generate a random integer between min (inclusive) and max (exclusive)- Parameters:
min- minimum value (inclusive)max- maximum value (exclusive)- Returns:
- random integer
-