org.intranet.elevator.model.operate
Class Building

java.lang.Object
  extended byorg.intranet.sim.ModelElement
      extended byorg.intranet.sim.Model
          extended byorg.intranet.elevator.model.operate.Building

public class Building
extends Model

The building is a factory for other domain objects that also links up CarRequests with the RequestIndicators for each Floor.


Field Summary
private  java.util.List cars
           
private  java.util.List floors
           
private  float height
           
private  Controller metaController
           
private  java.util.List people
           
 
Fields inherited from class org.intranet.sim.ModelElement
eventQueue
 
Constructor Summary
private Building()
           
  Building(EventQueue eQ, Controller controller)
           
  Building(EventQueue eQ, int numFloors, int numCars, Controller controller)
           
  Building(EventQueue eQ, int numFloors, int numCars, int carCapacity, Controller controller)
           
 
Method Summary
 void createCars(int x, int capacity)
           
 void createFloors(int x)
           
 Person createPerson(Location startLocation)
           
private  Table generateCarTable()
           
private  Table generatePersonTable()
           
 java.util.Iterator getCars()
           
 Floor getFloor(int index)
           
 java.util.Iterator getFloors()
           
 float getHeight()
           
 int getNumCars()
           
 int getNumFloors()
           
 java.util.List getStatistics()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

height

private float height

floors

private java.util.List floors

cars

private java.util.List cars

metaController

private Controller metaController

people

private java.util.List people
Constructor Detail

Building

private Building()

Building

public Building(EventQueue eQ,
                Controller controller)

Building

public Building(EventQueue eQ,
                int numFloors,
                int numCars,
                int carCapacity,
                Controller controller)

Building

public Building(EventQueue eQ,
                int numFloors,
                int numCars,
                Controller controller)
Method Detail

createFloors

public void createFloors(int x)

createCars

public void createCars(int x,
                       int capacity)

getHeight

public float getHeight()

getNumFloors

public int getNumFloors()

getNumCars

public int getNumCars()

getFloors

public java.util.Iterator getFloors()

getCars

public java.util.Iterator getCars()

getFloor

public Floor getFloor(int index)

createPerson

public Person createPerson(Location startLocation)

getStatistics

public java.util.List getStatistics()
Specified by:
getStatistics in class Model
Returns:
a list of Tables

generateCarTable

private Table generateCarTable()

generatePersonTable

private Table generatePersonTable()