public class Flight extends MapComponent implements DirectlyUpdatable
Modifier and Type | Field and Description |
---|---|
private java.util.Collection<Passenger> |
checkedIn
People that checked in already.
|
private java.util.Collection<Desk> |
checkInDesks
The desks.
|
private QueuingArea |
checkInQueue
The check in queuing area.
|
private QueuingArea |
checkPointQueue
The checkpoint queuing area.
|
private float |
flightTime
The time of flight (in seconds from the start of the simulation).
|
private FlightType |
flightType
The flight type.
|
private GateArea |
gateArea
The gate area.
|
static Flight |
NO_FLIGHT
Holder for no flight.
|
private int |
size
The flight size.
|
private float |
timeToFlight
The time to flight.
|
map
Constructor and Description |
---|
Flight(FlightType flightType,
double flightTime,
GateArea gateArea,
java.util.Collection<Desk> checkInDesks,
QueuingArea checkInQueue,
QueuingArea checkpointQueue)
Creates a new flight.
|
Flight(FlightType flightType,
int size,
double flightTime,
GateArea gateArea,
java.util.Collection<Desk> checkInDesks,
QueuingArea checkInQueue,
QueuingArea checkpointQueue)
Creates a new flight.
|
Modifier and Type | Method and Description |
---|---|
boolean |
alreadyCheckedIn(Passenger agent)
Check if an agent is checked in already.
|
void |
checkIn(Passenger agent)
Check an agent in into the flight.
|
java.util.Collection<Desk> |
getCheckInDesks()
Gets the check in desks.
|
QueuingArea |
getCheckInQueue()
Gets the check in queue.
|
QueuingArea |
getCheckPointQueue()
Gets the checkpoint queue.
|
int |
getFlightSize()
Gets the size of the flight.
|
float |
getFlightTime()
Get the time of flight (in seconds from the start of the simulation).
|
FlightType |
getFlightType()
Gets the flight type.
|
GateArea |
getGateArea()
Gets the gate area.
|
float |
getTimeToFlight()
Gets the time (s) to flight.
|
boolean |
timeToFlightExceeded()
Checks if the flight is gone.
|
java.lang.String |
toString() |
void |
update(int timeStep)
Updates the updatable element.
|
isDestroyed
public static final Flight NO_FLIGHT
private java.util.Collection<Passenger> checkedIn
private float flightTime
private float timeToFlight
private GateArea gateArea
private java.util.Collection<Desk> checkInDesks
private QueuingArea checkInQueue
private QueuingArea checkPointQueue
private FlightType flightType
private final int size
public Flight(FlightType flightType, double flightTime, GateArea gateArea, java.util.Collection<Desk> checkInDesks, QueuingArea checkInQueue, QueuingArea checkpointQueue)
flightType
- The flight type.flightTime
- The flight time.gateArea
- The gate area.checkInDesks
- The check in desks.checkInQueue
- The check in queue.checkpointQueue
- The checkpoint queue.public Flight(FlightType flightType, int size, double flightTime, GateArea gateArea, java.util.Collection<Desk> checkInDesks, QueuingArea checkInQueue, QueuingArea checkpointQueue)
flightType
- The flight type.size
- The flight size.flightTime
- The flight time.gateArea
- The gate area.checkInDesks
- The check in desks.checkInQueue
- The check in queue.checkpointQueue
- The checkpoint queue.public boolean alreadyCheckedIn(Passenger agent)
agent
- The agent.public void checkIn(Passenger agent)
agent
- The agent to check in.public java.util.Collection<Desk> getCheckInDesks()
public QueuingArea getCheckInQueue()
public QueuingArea getCheckPointQueue()
public int getFlightSize()
public float getFlightTime()
public FlightType getFlightType()
public GateArea getGateArea()
public float getTimeToFlight()
public boolean timeToFlightExceeded()
public java.lang.String toString()
toString
in class java.lang.Object