org.graphnetwork.util
Class Random

java.lang.Object
  extended by org.graphnetwork.util.Random

public class Random
extends java.lang.Object


Constructor Summary
Random()
           
 
Method Summary
static float getRandomPositiveFloatLim(float min, float max)
          Returns a random positive float between a minimum and a maximum value given by the user
static int getRandomPositiveInteger(int n)
          Returns a random positive number between 1 and a maximum value given by the user
static int getRandomPositiveIntegerLim(int min, int max)
          Returns a random positive int between a minimum and a maximum value given by the user
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Random

public Random()
Method Detail

getRandomPositiveInteger

public static int getRandomPositiveInteger(int n)
Returns a random positive number between 1 and a maximum value given by the user

Parameters:
n - the maximum value to return
Returns:
the random value between 1 and n

getRandomPositiveFloatLim

public static float getRandomPositiveFloatLim(float min,
                                              float max)
Returns a random positive float between a minimum and a maximum value given by the user

Parameters:
min - the minimum value to return
max - the maximum value to return
Returns:
a float value between min and max

getRandomPositiveIntegerLim

public static int getRandomPositiveIntegerLim(int min,
                                              int max)
Returns a random positive int between a minimum and a maximum value given by the user

Parameters:
min - the minimum value to return
max - the minimum value to return
Returns:
an integer value between min and max