Interface RoutePair
- All Known Subinterfaces:
FlightData,RoutePlot
- All Known Implementing Classes:
AbstractRoute,ACARSFlightReport,AssignmentLeg,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.0
- Author:
- Luke
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classHelper class when all you need is a naked RoutePair. -
Method Summary
Modifier and TypeMethodDescriptiondefault StringReturns a key that describes the route pair.Returns the arrival Airport.Returns the departure Airport.default Collection<Airport> Returns the airports in this Route Pair.default intReturns the distance between the Airports.default FlightTypeReturns the flight type for customs/gate purposes.default booleanReturns whether this RoutePair includes a particular IATA or ICAO code.default booleanReturns whether both airports are populated.default booleanReturns whether this RoutePair matches a particular Route Pair.default GeoLocationmidPoint()Returns the midpoint between the two Airports on a Great Circle route.static RoutePairCreates a new naked RoutePair.
-
Method Details
-
getAirportD
-
getAirportA
-
getDistance
default int getDistance()Returns the distance between the Airports.- Returns:
- the distance in miles, or -1 if not populated
-
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
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
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
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
Returns the flight type for customs/gate purposes.- Returns:
- a FlightType enumeration
-
createKey
Returns a key that describes the route pair.- Returns:
- the departure/arrival ICAO codes
-
of
-