be.ac.ua.broker.utils
Class RandomGenerator
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomGenerator
public RandomGenerator()
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 returnrangeEnd
- 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