m865.simulation
Class OffLoadEvent

java.lang.Object
  extended by m865.simulation.Event
      extended by m865.simulation.DepartmentStoreEvent
          extended by m865.simulation.OffLoadEvent
All Implemented Interfaces:
java.lang.Comparable, Prioritizeable

public class OffLoadEvent
extends DepartmentStoreEvent

OffLoadEvent will remove passengers from the elevator and have them begin their task on a given floor


Field Summary
protected  Elevator elevator
          The elevator
protected  int now
          The time each passenger disembarks
 
Fields inherited from class m865.simulation.DepartmentStoreEvent
departmentStore
 
Fields inherited from class m865.simulation.Event
firingTime
 
Constructor Summary
OffLoadEvent(java.lang.Integer time, DepartmentStore ds, Elevator elevator)
          Constructor for objects of class OffLoadEvent
 
Method Summary
 void fire()
          Determines how many and which passengers to remove.
 java.lang.String toString()
          The toString method
 
Methods inherited from class m865.simulation.Event
adjustPriority, compareTo, getFiringTime, setFiringTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

elevator

protected Elevator elevator
The elevator


now

protected int now
The time each passenger disembarks

Constructor Detail

OffLoadEvent

public OffLoadEvent(java.lang.Integer time,
                    DepartmentStore ds,
                    Elevator elevator)
Constructor for objects of class OffLoadEvent

Method Detail

fire

public void fire()
Determines how many and which passengers to remove. Removes these passenger from the elevator queue. Update the time record for the passengers. Schedules for any passengers that want to get on the elevator to get on

Specified by:
fire in class Event

toString

public java.lang.String toString()
The toString method

Overrides:
toString in class Event
Returns:
a string to identify this type of event