Class Pilot

All Implemented Interfaces:
Serializable, Comparable<NetworkUser>, GeoLocation, GeospaceLocation, MapEntry, MarkerMapEntry, RoutePair, ViewEntry

public class Pilot extends ConnectedUser implements RoutePair, GeospaceLocation
A bean to store online Pilot information.
Since:
1.0
Version:
10.0
Author:
Luke
See Also:
  • Constructor Details

    • Pilot

      public Pilot(int id, OnlineNetwork net)
      Initializes the bean with a given user ID.
      Parameters:
      id - the user ID
      net - the OnlineNetwork
  • Method Details

    • getAirportA

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

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

      public int getAltitude()
      Description copied from interface: GeospaceLocation
      Returns the altitude of the location above MSL.
      Specified by:
      getAltitude in interface GeospaceLocation
      Returns:
      the altitude in feet
    • isPopulated

      public boolean isPopulated()
      Description copied from interface: RoutePair
      Returns whether both airports are populated.
      Specified by:
      isPopulated in interface RoutePair
      Returns:
      TRUE if both Airports are set, otherwise FALSE
    • getComments

      public String getComments()
      Returns the User's Flight Plan comments.
      Returns:
      the comments
      See Also:
    • getEquipmentCode

      public String getEquipmentCode()
      Returns the User's equipment code.
      Returns:
      the equipment code
      See Also:
    • getGroundSpeed

      public int getGroundSpeed()
      Returns the User's ground speed.
      Returns:
      the ground speed in knots
      See Also:
    • getHeading

      public int getHeading()
      Returns the Pilot's heading.
      Returns:
      the heading in degrees
      See Also:
    • getType

      public final NetworkUser.Type getType()
      Description copied from class: NetworkUser
      Returns the user type.
      Specified by:
      getType in class NetworkUser
      Returns:
      the Type
    • getRating

      public final Rating getRating()
      Description copied from class: NetworkUser
      Returns the Controller's rating.
      Overrides:
      getRating in class NetworkUser
      Returns:
      the Rating
      See Also:
    • getRoute

      public String getRoute()
      Returns the Pilot's filed route.
      Returns:
      the route
      See Also:
    • isRoutePopulated

      public boolean isRoutePopulated()
      Returns if the waypoint collection has been populated.
      Returns:
      TRUE if the waypoints have been loaded, otherwise FALSE
    • isHighlighted

      public boolean isHighlighted()
      Returns if this Pilot should be highlighted.
      Returns:
      TRUE if the Pilot is highlighted, otherwise FALSE
      See Also:
    • setAltitude

      public void setAltitude(int alt)
      Updates the Pilot's altitude.
      Parameters:
      alt - the altitude in feet above Mean Sea Level
      See Also:
    • setAirportA

      public void setAirportA(Airport aa)
      Updates the destination Airport.
      Parameters:
      aa - the destination Airport
      See Also:
    • setAirportD

      public void setAirportD(Airport ad)
      Updates the origin Airport.
      Parameters:
      ad - the origin Airport
      See Also:
    • setComments

      public void setComments(String comments)
      Updates the Pilot's flight plan comments.
      Parameters:
      comments - the flight plan comments
      See Also:
    • setEquipmentCode

      public void setEquipmentCode(String eqCode)
      Updates the Pilot's equipment code.
      Parameters:
      eqCode - the equipment code
      See Also:
    • setGroundSpeed

      public void setGroundSpeed(int gSpeed)
      Updates the Pilot's ground speed.
      Parameters:
      gSpeed - the ground speed in knots
      See Also:
    • setHeading

      public void setHeading(int hdg)
      Updates the Pilot's heading.
      Parameters:
      hdg - the heading in degrees
      See Also:
    • setRoute

      public void setRoute(String route)
      Updates the Pilot's filed waypoints.
      Parameters:
      route - a space-delimited string
      Throws:
      NullPointerException - if route is null
      See Also:
    • addWaypoint

      public void addWaypoint(NavigationDataBean nd)
      Adds a point to the collection of waypoints.
      Parameters:
      nd - a NavigationDataBean
    • addWaypoints

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

      public void setHighlighted(boolean isHighlighted)
      Marks this online Pilot as highlighted.
      Parameters:
      isHighlighted - TRUE if the Pilot is highlighted, otherwise FALSE
      See Also:
    • setRating

      public final void setRating(Rating r)
      Description copied from class: NetworkUser
      Sets the Users's rating.
      Overrides:
      setRating in class NetworkUser
      Parameters:
      r - the Rating
      See Also:
    • getWaypoints

      public Collection<GeoLocation> getWaypoints()
      Returns the flight waypoints.
      Returns:
      a List of GeoLocations
    • getIconColor

      public String getIconColor()
      Description copied from interface: MarkerMapEntry
      Returns the icon color for this entry if displayed in a Google Map.
      Specified by:
      getIconColor in interface MarkerMapEntry
      Returns:
      the icon color
    • 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