Class LogbookHistoryHelper

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

public class LogbookHistoryHelper extends Object
A utility class to identify log book consistency over recent flights.
Since:
10.4
Version:
10.6
Author:
Luke
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates the helper.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the last Flight Report.
    boolean
    isConsistentAirline(int flights)
    Returns if an airline has been used consistently for the last number of flights.
    boolean
    isConsistentEquipment(int flights)
    Returns if an equipment type has been used consistently for the last number of flights.
    boolean
    isConsistentSimulator(int flights)
    Returns if a simulator has been used consistently for the last number of flights.
    boolean
    isContinuous(int flights)
    Returns if the logbook has been continuous for the past number of flights.
    boolean
    isCurent(int flights)
    Returns if the last number of flights have all been flown with non-historic Airlines.
    boolean
    isHistoric(int flights)
    Returns if the last number of flights have all been flown with historic Airlines.
    boolean
    isHistoricEQ(int flights)
    Returns if the last number of flights have all been flown with historic equipment.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LogbookHistoryHelper

      public LogbookHistoryHelper(Collection<FlightReport> flights)
      Creates the helper.
      Parameters:
      flights - the logbook entries
  • Method Details

    • isContinuous

      public boolean isContinuous(int flights)
      Returns if the logbook has been continuous for the past number of flights.
      Parameters:
      flights - the number of flights
      Returns:
      TRUE if the logbook is continuous, or FALSE if discontinuous or less than 2 entries in logbook
    • isConsistentAirline

      public boolean isConsistentAirline(int flights)
      Returns if an airline has been used consistently for the last number of flights.
      Parameters:
      flights - the number of flights
      Returns:
      TRUE if the Airline is consistent, otherwise FALSE
    • isConsistentEquipment

      public boolean isConsistentEquipment(int flights)
      Returns if an equipment type has been used consistently for the last number of flights.
      Parameters:
      flights - the number of flights
      Returns:
      TRUE if the equipment type is consistent, otherwise FALSE
    • isConsistentSimulator

      public boolean isConsistentSimulator(int flights)
      Returns if a simulator has been used consistently for the last number of flights.
      Parameters:
      flights - the number of flights
      Returns:
      TRUE if the simulator is consistent, otherwise FALSE
    • isCurent

      public boolean isCurent(int flights)
      Returns if the last number of flights have all been flown with non-historic Airlines.
      Parameters:
      flights - the number of flights
      Returns:
      TRUE if the flights have all been flown with non-historic Airlines
    • isHistoric

      public boolean isHistoric(int flights)
      Returns if the last number of flights have all been flown with historic Airlines.
      Parameters:
      flights - the number of flights
      Returns:
      TRUE if the flights have all been flown with historic Airlines
    • isHistoricEQ

      public boolean isHistoricEQ(int flights)
      Returns if the last number of flights have all been flown with historic equipment.
      Parameters:
      flights - the number of flights
      Returns:
      TRUE if the flights have all been flown with historic Aircraft
    • getLastFlight

      public FlightReport getLastFlight()
      Returns the last Flight Report.
      Returns:
      a FlightReport, or null if no flights in logbook