Class PopulatedRoute

All Implemented Interfaces:
Serializable, Comparable<Object>, ComboAlias, IDBean, Route, RoutePair, Cacheable
Direct Known Subclasses:
DispatchRoute

public class PopulatedRoute extends FlightRoute implements Route
A Flight Route that has its waypoints populated.
Since:
2.6
Version:
7.2
Author:
Luke
See Also:
  • Constructor Details

    • PopulatedRoute

      public PopulatedRoute()
  • Method Details

    • load

      protected void load(PopulatedRoute pr)
      Helper method to copy a route from one PopulatedRoute to another.
      Parameters:
      pr - the PopulatedRoute bean
    • getWaypoints

      public LinkedList<NavigationDataBean> getWaypoints()
      Returns the waypoints on this route.
      Specified by:
      getWaypoints in interface Route
      Returns:
      a Collection of NavigationDataBeans
    • getAirway

      public String getAirway(NavigationDataBean nd)
      Returns the Airway each waypoint is on.
      Parameters:
      nd - the waypoint
      Returns:
      the Airway code, or null if none
    • getSize

      public int getSize()
      Returns the number of waypoints.
      Specified by:
      getSize in interface Route
      Returns:
      the number of Waypoints
    • addWaypoint

      public void addWaypoint(NavigationDataBean nd, String airway)
      Adds a waypoint to the route.
      Parameters:
      nd - the waypoint
      airway - the airway it is on, or null
    • addWaypoint

      public void addWaypoint(NavigationDataBean nd)
      Adds a waypoint to the route.
      Specified by:
      addWaypoint in interface Route
      Parameters:
      nd - the waypoint
    • addWaypoints

      public void addWaypoints(Collection<NavigationDataBean> nds)
      Adds multiple waypoints to the route.
      Parameters:
      nds - a Collection of NavigationDataBeans
    • insertWaypoint

      public void insertWaypoint(NavigationDataBean nd, String airway)
      Adds a waypoint to the start of the route.
      Parameters:
      nd - the waypoint
      airway - the airway it is on, or null
    • removeAirway

      public void removeAirway(String code)
      Removes all waypoints on a particular Airway from the route.
      Parameters:
      code - the airway code
    • getRoute

      public String getRoute()
      Returns the route.
      Specified by:
      getRoute in interface Route
      Overrides:
      getRoute in class FlightRoute
      Returns:
      a space-separated list of waypoints and airways
    • getComboAlias

      public String getComboAlias()
      Description copied from interface: ComboAlias
      Returns the alias to use in the HTML <OPTION> element.
      Specified by:
      getComboAlias in interface ComboAlias
      Returns:
      The alias for this entry
    • getComboName

      public String getComboName()
      Description copied from interface: ComboAlias
      Returns the visible name to use in the HTML <OPTION> element.
      Specified by:
      getComboName in interface ComboAlias
      Returns:
      The visible name for this entry
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class FlightRoute