Class Gate

All Implemented Interfaces:
Serializable, Cloneable, Comparable<NavigationDataBean>, ComboAlias, GeoLocation, IconMapEntry, MapEntry, MarkerMapEntry, UseCount, Cacheable
Direct Known Subclasses:
SelectableGate

public class Gate extends NavigationDataBean implements UseCount, ComboAlias
A bean to store airport Gate information.
Since:
5.1
Version:
11.1
Author:
Luke
See Also:
  • Constructor Details

    • Gate

      public Gate(double lat, double lon)
      Creates the bean.
      Parameters:
      lat - the latitude in degrees
      lon - the longitude in degrees
    • Gate

      public Gate(Gate g, int usage)
      Clones an existing gate, with the option to override usage counts.
      Parameters:
      g - the Gate
      usage - the new usage count
  • Method Details

    • getUniqueID

      public String getUniqueID()
      Generates an ID for this Gate, unique for a particular Airport
      Returns:
      a unique ID
    • getHeading

      public int getHeading()
      Returns the gate heading.
      Returns:
      the heading in degrees
    • getGateType

      public GateType getGateType()
      Returns the gate type.
      Returns:
      the Type
    • getGateNumber

      public int getGateNumber()
      Returns the gate number.
      Returns:
      the gate number
    • getAirlines

      public Collection<Airline> getAirlines()
      Returns what Airlines use this Gate.
      Returns:
      a Collection of Airline beans
    • getZone

      public GateZone getZone()
      Returns whether this Gate is used for international flights or other special customs zones.
      Returns:
      a GateZone
    • getUseCount

      public int getUseCount()
      Description copied from interface: UseCount
      Returns the number of times this object has been used.
      Specified by:
      getUseCount in interface UseCount
      Returns:
      the number of uses
    • hasAirline

      public boolean hasAirline(Airline a)
      Returns whether a Gate serves a paticular Airline.
      Parameters:
      a - the Airline
      Returns:
      TRUE if a is null or the Airline uses this Gate, otherwise FALSE
    • setUseCount

      public void setUseCount(int cnt)
      Updates the number of times this gate has been used.
      Parameters:
      cnt - the number of flights
    • setHeading

      public void setHeading(int hdg)
      Updates the gate heading.
      Parameters:
      hdg - the heading in degrees
    • setName

      public void setName(String name)
      Description copied from class: NavigationDataBean
      Updates the object's name.
      Overrides:
      setName in class NavigationDataBean
      Parameters:
      name - the name
      See Also:
    • addAirline

      public void addAirline(Airline a)
      Marks this gate as being used by an Airline.
      Parameters:
      a - the Airline bean
    • clearAirlines

      public void clearAirlines()
      Clears all Airlines associated with this Gate.
    • setZone

      public void setZone(GateZone z)
      Updates the customs zone used for this Gate.
      Parameters:
      z - a GateZone
    • 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
    • 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
    • getPaletteCode

      public int getPaletteCode()
      Description copied from interface: IconMapEntry
      Returns the Google Earth palette code.
      Specified by:
      getPaletteCode in interface IconMapEntry
      Returns:
      the palette code
    • getIconCode

      public int getIconCode()
      Description copied from interface: IconMapEntry
      Returns the Google Earth icon code.
      Specified by:
      getIconCode in interface IconMapEntry
      Returns:
      the icon code within the palette
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class NavigationDataBean
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class NavigationDataBean
    • compareTo

      public int compareTo(NavigationDataBean ndb2)
      Description copied from class: NavigationDataBean
      Compares two objects by comparing their codes. If the codes are equal, then their item types and then distances from point 0,0 are compared.
      Specified by:
      compareTo in interface Comparable<NavigationDataBean>
      Overrides:
      compareTo in class NavigationDataBean