Class LoadStatistics

java.lang.Object
org.deltava.beans.stats.LoadStatistics
All Implemented Interfaces:
Comparable<LoadStatistics>

public class LoadStatistics extends Object implements Comparable<LoadStatistics>
A bean to track flight load statistics.
Since:
11.2
Version:
11.2
Author:
Luke
  • Constructor Details

    • LoadStatistics

      public LoadStatistics(String label)
      Creates the bean.
      Parameters:
      label - the view label
  • Method Details

    • getLabel

      public String getLabel()
      Returns the view label.
      Returns:
      the label
    • getLoadFactor

      public double getLoadFactor()
      Returns the average load factor.
      Returns:
      the load factor from 0 to 1
    • getPax

      public int getPax()
      Returns the total number of passengers carried.
      Returns:
      the number of passengers
    • setLoad

      public void setLoad(double lf)
      Updates the average load factor.
      Parameters:
      lf - the load factor
    • setPax

      public void setPax(int pax)
      Updates the total number of passengers carried.
      Parameters:
      pax - the number of passengers
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(LoadStatistics ls2)
      Specified by:
      compareTo in interface Comparable<LoadStatistics>