org.intranet.sim.event
Class TrackingUpdateEvent

java.lang.Object
  extended byorg.intranet.sim.event.Event
      extended byorg.intranet.sim.event.IncrementalUpdateEvent
          extended byorg.intranet.sim.event.TrackingUpdateEvent
Direct Known Subclasses:
Door.CloseEvent, Door.OpenEvent, MovableLocation.ArrivalEvent

public abstract class TrackingUpdateEvent
extends IncrementalUpdateEvent


Nested Class Summary
 
Nested classes inherited from class org.intranet.sim.event.Event
Event.EventTimeComparator
 
Field Summary
private  long beginTime
           
private  float beginValue
           
private  float distance
           
 
Fields inherited from class org.intranet.sim.event.Event
 
Constructor Summary
private TrackingUpdateEvent()
           
  TrackingUpdateEvent(long beginTime, float begin, long endTime, float end)
           
 
Method Summary
 float currentValue(long time)
          Gets the current tracking value as a straight interpolation between the beginValue and endValue.
private  float percentDone(long time)
           
 
Methods inherited from class org.intranet.sim.event.IncrementalUpdateEvent
updateTime
 
Methods inherited from class org.intranet.sim.event.Event
getId, getTime, perform, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

beginTime

private long beginTime

beginValue

private float beginValue

distance

private float distance
Constructor Detail

TrackingUpdateEvent

private TrackingUpdateEvent()

TrackingUpdateEvent

public TrackingUpdateEvent(long beginTime,
                           float begin,
                           long endTime,
                           float end)
Method Detail

percentDone

private float percentDone(long time)

currentValue

public final float currentValue(long time)
Gets the current tracking value as a straight interpolation between the beginValue and endValue.

Parameters:
time - The current time. Do not pass Event.getTime(), use eventQueue.getCurrentTime().
Returns:
The current value being tracked by this event.