Class AccomplishmentHistoryHelper

java.lang.Object
org.deltava.beans.stats.AccomplishmentHistoryHelper

public class AccomplishmentHistoryHelper extends Object
A utility class to determine what Accomplishments a Pilot has achieved.
Since:
3.2
Version:
11.0
Author:
Luke
  • Constructor Details

    • AccomplishmentHistoryHelper

      public AccomplishmentHistoryHelper(Pilot p)
      Creates the bean.
      Parameters:
      p - the Pilot
  • Method Details

    • add

      public void add(FlightReport fr)
      Adds a FlightReport to the totals.
      Parameters:
      fr - a FlightReport bean
    • add

      public void add(ConnectionEntry ce)
      Adds a Dispatch connection to the totals.
      Parameters:
      ce - a ConnectionEntry bean
    • has

      Determines whether a Pilot has achieved a particular Accomplishment. This returns an Enumeration that indicates whether the Pilot exactly matches the requirements, or exceeds them.
      Parameters:
      a - the Accomplishment bean
      Returns:
      a Result
    • getProgress

      public long getProgress(Accomplishment a)
      Returns how far a pilot is towards a particular Accomplishment.
      Parameters:
      a - the Accomplishment
      Returns:
      the value achieved thus far
    • getPilotID

      public int getPilotID()
      Returns the Pilot's database ID.
      Returns:
      the database ID
    • missing

      public Collection<?> missing(Accomplishment a)
      Returns missing elements from a particular Accomplishment.
      Parameters:
      a - the Accomplishment bean
      Returns:
      a Collection of missing objects
    • achieved

      public Instant achieved(Accomplishment a)
      Returns the date that a pilot achieved an Accomplishment.
      Parameters:
      a - the Accomplishment
      Returns:
      the date/time it was achieved, or null