Class OnTimeHelper

java.lang.Object
org.deltava.beans.flight.OnTimeHelper

public class OnTimeHelper extends Object
A utility class to calculate on-time statistics for a flight.
Since:
8.4
Version:
11.6
Author:
Luke
  • Constructor Details

    • OnTimeHelper

      public OnTimeHelper(Collection<ScheduleEntry> entries)
      Initializes the helper.
      Parameters:
      entries - a Collection of ScheduleEntry beans
  • Method Details

    • getScheduleEntry

      public ScheduleEntry getScheduleEntry()
      Returns the ScheduleEntry used to calculate timeliness.
      Returns:
      a ScheduleEntry, or null if none meeting tolerances
    • hasFlights

      public boolean hasFlights()
      Returns if the helper has any flights to check against.
      Returns:
      TRUE if flights or schedule entries have been loaded, otherwise FALSE
    • add

      public void add(DraftFlightReport dfr)
      Adds a Draft Flight Report to calculate timeliness. This is used for situations where a Flight Assignment was generated on a different day and the schedule no longer contains the same flights.
      Parameters:
      dfr - a DraftFlightReport
    • setDepartureTolerance

      public void setDepartureTolerance(int minutes)
      Sets the tolerance for finding a possible departure flight.
      Parameters:
      minutes - the tolerance in minutes
    • validate

      public OnTime validate(FlightTimes fr)
      Determines whether a flight was on time.
      Parameters:
      fr - a FlightTimes object
      Returns:
      an OnTime enumeration
    • validateDeparture

      public OnTime validateDeparture(FlightTimes fr)
      Determines whether a flight is departing on time.
      Parameters:
      fr - a FlightTimesl object
      Returns:
      an OnTime enumeration