Sim
Class FixedLocationManager

java.lang.Object
  extended by Sim.FixedLocationManager
All Implemented Interfaces:
LocationManager

public class FixedLocationManager
extends java.lang.Object
implements LocationManager

FixedLocationManager implements a LocationManager that always returns the same location. This can be used to simulate nodes that never move.


Constructor Summary
FixedLocationManager(Location location)
          Constructs a new FixedLocationManager that always returns the given Location from its getLocation method.
 
Method Summary
 Location getLocation(double t)
          Returns the location produced by this manager at the given time t.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedLocationManager

public FixedLocationManager(Location location)
Constructs a new FixedLocationManager that always returns the given Location from its getLocation method.

Parameters:
location - non-null Location
Method Detail

getLocation

public Location getLocation(double t)
Returns the location produced by this manager at the given time t. The value of t passed in must be equal to or greater than the value of all previous t values passed into this method.

Specified by:
getLocation in interface LocationManager
Returns:
non-null generated Location