Class RandomDefault

    • Constructor Detail

      • RandomDefault

        public RandomDefault()
        Initializes a new instance of the RandomDefault class, using a seed generated from the system clock.
      • RandomDefault

        public RandomDefault​(int seed)
        Initializes a new instance of the RandomDefault class, with a specified seed.
    • Method Detail

      • nextDouble

        public double nextDouble()
        Generates a random floating-point number that is greater than or equal to 0.0, and less than 1.0.
        Specified by:
        nextDouble in interface RandomNumberGenerator
      • nextInt

        public int nextInt​(int minValue,
                           int maxValue)
        Generates a random integer between [minValue..maxValue).
        Specified by:
        nextInt in interface RandomNumberGenerator
        Parameters:
        minValue - the least legal value for the Random number.
        maxValue - One greater than the greatest legal return value.
        Returns:
        Random int between [minValue..maxValue).