jasi.airtraffic.defi
Class FlightBean

java.lang.Object
  extended by jasi.sim.basic.value.AbstractSimValueType
      extended by jasi.sim.basic.value.AbstractComparableObject<Element>
          extended by jasi.sim.basic.element.AbstractElementBean
              extended by jasi.airtraffic.defi.FlightHandler
                  extended by jasi.airtraffic.defi.FlightBean
All Implemented Interfaces:
Flight, Element, SimObject, ExtendedComparable<Element>, SimValue, java.io.Serializable, java.lang.Comparable<Element>

public class FlightBean
extends FlightHandler

A flight object. It implements the method of the flight interface.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface jasi.sim.basic.element.Element
COMPARATOR
 
Constructor Summary
FlightBean()
          Constructor for a flight.
FlightBean(Id id)
          Constructor for a flight for a given ID.
FlightBean(java.lang.String name, Airport startAirport, Time startTime, Airport landAirport, Time landTime)
          Constructor for a flight.
 
Method Summary
 Element delete()
          Delete this element.
 Coordinate getCoordinate(Time time)
          Calculate actual coordinate.
 Space getDistance()
          Calculate the distance between start and landing airport.
 Coordinate getLandCoordinate()
          Get the landing airport's coordinate.
 Speed getSpeed()
          Calculate the speed for the flight.
 Coordinate getStartCoordinate()
          Get the start airport's coordinate.
 Time getTime()
          Calculate the required time for this flight.
 
Methods inherited from class jasi.airtraffic.defi.FlightHandler
getLandAirport, getLandTime, getName, getStartAirport, getStartTime, setLandAirport, setLandTime, setName, setStartAirport, setStartTime, toString
 
Methods inherited from class jasi.sim.basic.element.AbstractElementBean
acceptDelete, compareTo, elements, equals, get, getId, getKey, hashCode, isDeleted, registered, set, setId, setKey
 
Methods inherited from class jasi.sim.basic.value.AbstractComparableObject
isEQ, isGE, isGT, isLE, isLT, isNE
 
Methods inherited from class jasi.sim.basic.value.AbstractSimValueType
getContent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jasi.sim.basic.element.Element
getKey, isDeleted, registered, setKey
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface jasi.sim.basic.id.SimObject
getId, setId
 

Constructor Detail

FlightBean

public FlightBean()
Constructor for a flight.


FlightBean

public FlightBean(Id id)
Constructor for a flight for a given ID.

Parameters:
id - The ID.

FlightBean

public FlightBean(java.lang.String name,
                  Airport startAirport,
                  Time startTime,
                  Airport landAirport,
                  Time landTime)
Constructor for a flight.

Parameters:
name - The flight's name.
startAirport - The flight's start airport.
startTime - The flight's start time.
landAirport - The flight's landing airport.
landTime - The flight's landing time.
Method Detail

delete

public Element delete()
Delete this element.

Specified by:
delete in interface Element
Overrides:
delete in class AbstractElementBean
Returns:
The deleted element.
See Also:
AbstractElementBean.delete()

getSpeed

public Speed getSpeed()
Calculate the speed for the flight.

Returns:
The required speed.
See Also:
Flight.getSpeed()

getDistance

public Space getDistance()
Calculate the distance between start and landing airport.

Returns:
The distance.
See Also:
Flight.getDistance()

getTime

public Time getTime()
Calculate the required time for this flight.

Returns:
The required time.
See Also:
Flight.getTime()

getStartCoordinate

public Coordinate getStartCoordinate()
Get the start airport's coordinate.

Returns:
The coordinate.

getLandCoordinate

public Coordinate getLandCoordinate()
Get the landing airport's coordinate.

Returns:
The coordinate.

getCoordinate

public Coordinate getCoordinate(Time time)
Calculate actual coordinate.

Parameters:
time - The actual time.
Returns:
The calculated coordinate.