Interface RoutePair

All Known Subinterfaces:
FlightData, RoutePlot
All Known Implementing Classes:
AbstractRoute, ACARSFlightReport, AssignmentLeg, BriefingPackage, CharterRequest, DispatchLogEntry, DispatchRoute, DraftFlightReport, ExternalDispatchRoute, ExternalRoute, FDRFlightReport, Flight, FlightInfo, FlightReport, FlightRoute, GateUsage, GetFlightReportStatistics.DispatchScheduleRoute, ImportRoute, LogbookSearchCriteria, Pilot, PopulatedRoute, RawScheduleEntry, Route, RouteBuilder, RoutePair.RoutePairImpl, RoutePlotQuestion, RoutePlotQuestionProfile, RouteStats, RunwayGateUsage, RunwayHelper, RunwayUsage, ScheduleEntry, ScheduleRoute, ScheduleSearchCriteria, ScheduleSearchEntry, SimFDRFlightReport, XACARSFlightReport, XAFlightInfo

public interface RoutePair
An interface to mark Airport pairs.
Since:
2.6
Version:
12.4
Author:
Luke
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Helper class when all you need is a naked RoutePair.
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    Returns a key that describes the route pair.
    Returns the arrival Airport.
    Returns the departure Airport.
    default List<Airport>
    Returns the airports in this Route Pair.
    default int
    Returns the distance between the Airports.
    default FlightType
    Returns the flight type for customs/gate purposes.
    default boolean
    Returns whether this RoutePair includes a particular IATA or ICAO code.
    default boolean
    Returns whether both airports are populated.
    default boolean
    Returns whether this RoutePair matches a particular Route Pair.
    default GeoLocation
    Returns the midpoint between the two Airports on a Great Circle route.
    static RoutePair
    of(Airport aD, Airport aA)
    Creates a new naked RoutePair.
  • Method Details

    • getAirportD

      Airport getAirportD()
      Returns the departure Airport.
      Returns:
      the departure Airport
    • getAirportA

      Airport getAirportA()
      Returns the arrival Airport.
      Returns:
      the arrival Airport
    • getDistance

      default int getDistance()
      Returns the distance between the Airports.
      Returns:
      the distance in miles, or -1 if not populated
    • midPoint

      default GeoLocation midPoint()
      Returns the midpoint between the two Airports on a Great Circle route.
      Returns:
      the midpoint GeoLocation, or null if not populated
    • isPopulated

      default boolean isPopulated()
      Returns whether both airports are populated.
      Returns:
      TRUE if both Airports are set, otherwise FALSE
    • getAirports

      default List<Airport> getAirports()
      Returns the airports in this Route Pair. This is only filled if both Airports are populated.
      Returns:
      a List of Airports, or an empty list if not populated.
      See Also:
    • matches

      default boolean matches(RoutePair rp)
      Returns whether this RoutePair matches a particular Route Pair.
      Parameters:
      rp - a RoutePair
      Returns:
      TRUE if the departure and arrival Airports are the same, otherwise FALSE
    • includes

      default boolean includes(String code)
      Returns whether this RoutePair includes a particular IATA or ICAO code.
      Parameters:
      code - the ICAO/IATA code
      Returns:
      TRUE if the code matches the departure or arrival airport, otherwise FALSE
    • getFlightType

      default FlightType getFlightType()
      Returns the flight type for customs/gate purposes.
      Returns:
      a FlightType enumeration
    • createKey

      default String createKey()
      Returns a key that describes the route pair.
      Returns:
      the departure/arrival ICAO codes
    • of

      static RoutePair of(Airport aD, Airport aA)
      Creates a new naked RoutePair.
      Parameters:
      aD - the deprature Airport
      aA - the arrival Airport
      Returns:
      a RoutePair