Class AbstractRoute

java.lang.Object
org.deltava.beans.schedule.AbstractRoute
All Implemented Interfaces:
GeoLocation, MapEntry, RoutePair
Direct Known Subclasses:
ImportRoute, RouteStats, ScheduleRoute

public abstract class AbstractRoute extends Object implements RoutePair, MapEntry
A bean to store route frequency data.
Since:
4.1
Version:
9.0
Author:
Luke
  • Field Details

    • _frequency

      protected int _frequency
  • Constructor Details

    • AbstractRoute

      protected AbstractRoute(Airport aD, Airport aA)
      Creates the route.
      Parameters:
      aD - the departure Airport
      aA - the arrival Airport
      Throws:
      NullPointerException - if aD or aA are null
  • Method Details

    • getAirportD

      public Airport getAirportD()
      Description copied from interface: RoutePair
      Returns the departure Airport.
      Specified by:
      getAirportD in interface RoutePair
      Returns:
      the departure Airport
    • getAirportA

      public Airport getAirportA()
      Description copied from interface: RoutePair
      Returns the arrival Airport.
      Specified by:
      getAirportA in interface RoutePair
      Returns:
      the arrival Airport
    • getLatitude

      public double getLatitude()
      Description copied from interface: GeoLocation
      Returns the latitude of this location.
      Specified by:
      getLatitude in interface GeoLocation
      Returns:
      the latitude in degrees
    • getLongitude

      public double getLongitude()
      Description copied from interface: GeoLocation
      Returns the longitude of this location.
      Specified by:
      getLongitude in interface GeoLocation
      Returns:
      the longitude in degrees
    • getPoints

      public Collection<? extends GeoLocation> getPoints()
      Returns the departure and arrival airports.
      Returns:
      a Collection of GeoLocations
    • getFlights

      public int getFlights()
      Returns the number of flights in this route pair.
      Returns:
      the number of flights
    • getInfoBox

      public String getInfoBox()
      Description copied from interface: MapEntry
      Returns the text to display in this marker's infobox if displayed in a Google Map.
      Specified by:
      getInfoBox in interface MapEntry
      Returns:
      the infobox HTML text, or null if no infobox to be displayed
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object