Class RandomUtils


  • public class RandomUtils
    extends Object
    • Constructor Detail

      • RandomUtils

        public RandomUtils()
    • Method Detail

      • randomIntIncludeMax

        public static int randomIntIncludeMax​(int min,
                                              int max)
        Get random integer in min-max range. maximum value included
        Parameters:
        min - - minimal value
        max - - 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 value
        max - - 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 value
        max - - 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 value
        max - - 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