be.ac.ua.broker.utils
Class RandomGenerator

java.lang.Object
  extended by be.ac.ua.broker.utils.RandomGenerator

public class RandomGenerator
extends java.lang.Object

This class contains some random variable generation utilities needed by the broker application. It provides static methods to generate a random integer within a range of numbers and the generation of a random boolean value.

Author:
Vermeersch Kurt

Constructor Summary
RandomGenerator()
           
 
Method Summary
static boolean generateRandomBoolean()
           
static java.awt.Color generateRandomColor()
           
static int generateRandomInt(int rangeBegin, int rangeEnd)
          Generate a random Integer that lies between the given rangeBegin and the rangeEnd value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomGenerator

public RandomGenerator()
Method Detail

generateRandomInt

public static int generateRandomInt(int rangeBegin,
                                    int rangeEnd)
Generate a random Integer that lies between the given rangeBegin and the rangeEnd value.

Parameters:
rangeBegin - lower boundary for the random Integer to return
rangeEnd - upper boundary for the random Integer to return
Returns:
the randomly generated Integer

generateRandomBoolean

public static boolean generateRandomBoolean()
Returns:
the randomly generated Boolean

generateRandomColor

public static java.awt.Color generateRandomColor()
Returns:
a randomly generated Color