objectdraw
Class RandomIntGenerator

java.lang.Object
  extended by objectdraw.RandomIntGenerator

public class RandomIntGenerator
extends Object

A generator that provides random integer between two values upon demand

Version:
1.1.1 released February 2005

Constructor Summary
RandomIntGenerator(int min, int max)
          Constructs a new RandomInt that can generate values v such that min <= v <= max.
 
Method Summary
 int nextValue()
          Retrieves a new integer value from the generator.
 String toString()
          produce String description of this random number generator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RandomIntGenerator

public RandomIntGenerator(int min,
                          int max)
Constructs a new RandomInt that can generate values v such that min <= v <= max.

Parameters:
min - the minimum value
max - the maximum value
Method Detail

nextValue

public int nextValue()
Retrieves a new integer value from the generator.

Returns:
a random integer

toString

public String toString()
produce String description of this random number generator

Overrides:
toString in class Object
Returns:
description of this random number generator