Class RouteStats

All Implemented Interfaces:
Comparable<RouteStats>, GeoLocation, MapEntry, RoutePair

public class RouteStats extends AbstractRoute implements Comparable<RouteStats>
A bean to store route frequency data.
Since:
4.1
Version:
11.0
Author:
Luke
  • Constructor Details

    • RouteStats

      public RouteStats(Airport aD, Airport aA, int freq)
      Creates the bean.
      Parameters:
      aD - the departure Airport
      aA - the arrival Airport
      freq - the number of flights
  • Method Details

    • add

      public void add(int flights, int acarsFlights)
      Adds flights.
      Parameters:
      flights - the total number of flights
      acarsFlights - the number of ACARS flights
    • setLastFlight

      public void setLastFlight(Instant dt)
      Updates the date/time of the last flight.
      Parameters:
      dt - the date/time of the latest flight, or null if none
    • getACARSFlights

      public int getACARSFlights()
      Returns the number of ACARS flight legs.
      Returns:
      the number of ACARS legs
    • getLastFlight

      public Instant getLastFlight()
      Returns the last flight date for this route pair.
      Returns:
      the last flight date/time, or null if none
    • compareTo

      public int compareTo(RouteStats rs2)
      Specified by:
      compareTo in interface Comparable<RouteStats>