Class AirportServiceMap

All Implemented Interfaces:
Serializable, Cloneable, Map<Airline, Collection<Airport>>, NavigableMap<Airline, Collection<Airport>>, SequencedMap<Airline, Collection<Airport>>, SortedMap<Airline, Collection<Airport>>

public class AirportServiceMap extends TreeMap<Airline, Collection<Airport>>
A bean to track which Airports are served by particular Airlines.
Since:
1.0
Version:
9.0
Author:
Luke
See Also:
  • Constructor Details

    • AirportServiceMap

      public AirportServiceMap()
  • Method Details

    • add

      public void add(Airline a, Airport... aps)
      Adds a particular Airport/Airline pair.
      Parameters:
      a - the Airline bean
      aps - the Airport bean(s)
    • isServiced

      public boolean isServiced(Airport ap, Airline a)
      Queries whether a particular Airline serves a particular Airport.
      Parameters:
      ap - the Airport bean
      a - the Airline bean
      Returns:
      TRUE if the Airline serves the Airport, otherwise FALSE
    • getAirlineCodes

      public Collection<String> getAirlineCodes(Airport a)
      Returns the codes of all Airlines serving a particular Airport.
      Parameters:
      a - the Airport bean
      Returns:
      a Collection of Airline codes
      See Also: