Package ru.dest.library.utils
Class RandomUtils
- java.lang.Object
-
- ru.dest.library.utils.RandomUtils
-
public class RandomUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description RandomUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doublerandomDouble(double max)Get random double in 0-max range. maximum value not includedstatic doublerandomDouble(double min, double max)Get random double in min-max range. maximum value not includedstatic doublerandomDoubleIncludeMax(double max)Get random double in 0-max range. maximum value includedstatic doublerandomDoubleIncludeMax(double min, double max)Get random double in min-max range. maximum value includedstatic intrandomInt(int max)Get random integer in 0-max range. maximum value not includedstatic intrandomInt(int min, int max)Get random integer in min-max range. maximum value not includedstatic intrandomIntIncludeMax(int max)Get random integer in 0-max range. maximum value includedstatic intrandomIntIncludeMax(int min, int max)Get random integer in min-max range. maximum value included
-
-
-
Method Detail
-
randomIntIncludeMax
public static int randomIntIncludeMax(int min, int max)Get random integer in min-max range. maximum value included- Parameters:
min- - minimal valuemax- - maximal value- Returns:
- random integer within the specified range
-
randomInt
public static int randomInt(int min, int max)Get random integer in min-max range. maximum value not included- Parameters:
min- - minimal valuemax- - maximal value- Returns:
- random integer within the specified range
-
randomIntIncludeMax
public static int randomIntIncludeMax(int max)
Get random integer in 0-max range. maximum value included- Parameters:
max- - maximal value- Returns:
- random integer within the specified range
-
randomInt
public static int randomInt(int max)
Get random integer in 0-max range. maximum value not included- Parameters:
max- - maximal value- Returns:
- random integer within the specified range
-
randomDoubleIncludeMax
public static double randomDoubleIncludeMax(double min, double max)Get random double in min-max range. maximum value included- Parameters:
min- - minimal valuemax- - maximal value- Returns:
- random double within the specified range
-
randomDouble
public static double randomDouble(double min, double max)Get random double in min-max range. maximum value not included- Parameters:
min- - minimal valuemax- - maximal value- Returns:
- random double within the specified range
-
randomDoubleIncludeMax
public static double randomDoubleIncludeMax(double max)
Get random double in 0-max range. maximum value included- Parameters:
max- - maximal value- Returns:
- random double within the specified range
-
randomDouble
public static double randomDouble(double max)
Get random double in 0-max range. maximum value not included- Parameters:
max- - maximal value- Returns:
- random double within the specified range
-
-