Class RunwayGateUsage

java.lang.Object
org.deltava.beans.stats.RunwayGateUsage
All Implemented Interfaces:
Serializable, RoutePair, Cacheable
Direct Known Subclasses:
GateUsage, RunwayUsage

abstract class RunwayGateUsage extends Object implements Cacheable, RoutePair
A bean to store Runway/Gate usage statistics.
Since:
10.0
Version:
11.1
Author:
Luke
  • Field Details

  • Constructor Details

    • RunwayGateUsage

      public RunwayGateUsage(RoutePair rp, boolean isDeparture)
      Creates the bean.
      Parameters:
      rp - the RoutePair
      isDeparture - TRUE if departure gates/runways, otherwise FALSE
  • 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
    • size

      public int size()
      Returns the number of Runways/Gates with usage data.
      Returns:
      the number of Runways/Gates
    • getIsDeparture

      public boolean getIsDeparture()
      Returns whether these are departure Runway/Gate statistics.
      Returns:
      TRUE if departure statistics, otherwise FALSE
    • add

      public void add(String name, Airline a, int totalUsage)
      Adds usage count for a particular Gate/Runway and Airline.
      Parameters:
      name - the Runway/Gate name
      a - the Airline
      totalUsage - the total usage count
    • getTotalUsage

      public int getTotalUsage(String gateName)
      Returns the usage count for a particular Gate/Runway.
      Parameters:
      gateName - the Runway/Gate name
      Returns:
      the usage count, or zero if unknown
    • getTotal

      public int getTotal()
      Returns the total usage across all gates.
      Returns:
      the total usage count
    • clear

      public void clear()
      Clears usage totals.
    • cacheKey

      public Object cacheKey()
      Description copied from interface: Cacheable
      Returns the cache key for this object. Caches call this method when adding the object.
      Specified by:
      cacheKey in interface Cacheable
      Returns:
      the cache key for the object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object