Sim
Class RandomLocationGenerator

java.lang.Object
  extended by Sim.RandomLocationGenerator
All Implemented Interfaces:
LocationGenerator

public class RandomLocationGenerator
extends java.lang.Object
implements LocationGenerator

A location creator that is used to get random value locations that are within the range specified in the constructor.


Constructor Summary
RandomLocationGenerator(java.lang.Integer seed, java.lang.Integer area)
          Set the input random seed, max x and y for the returned location.
 
Method Summary
 Location getNext()
          Gets the next location based on the input paramters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomLocationGenerator

public RandomLocationGenerator(java.lang.Integer seed,
                               java.lang.Integer area)
Set the input random seed, max x and y for the returned location.

Parameters:
seed - Seed for the randomly generated locations
xMax - Max x value that should be used in generating locations
yMax - Max y value that should be used for generating locations
Method Detail

getNext

public Location getNext()
Gets the next location based on the input paramters.

Specified by:
getNext in interface LocationGenerator
Returns:
new random location based on x, y and seed inputs