Class EliteLifetime

java.lang.Object
org.deltava.beans.econ.EliteLifetime
All Implemented Interfaces:
Serializable, Cloneable, Comparable<EliteLifetime>, Auditable, EliteLevelBean, EliteTotals, RGBColor

public class EliteLifetime extends Object implements Auditable, EliteLevelBean, EliteTotals, Comparable<EliteLifetime>
A bean to store lifetime Elite status levels.
Since:
11.5
Version:
11.5
Author:
Luke
See Also:
  • Constructor Details

    • EliteLifetime

      public EliteLifetime(String name)
      Creates the bean.
      Parameters:
      name - the status level name
  • Method Details

    • getName

      public String getName()
      Returns the status level name.
      Returns:
      the name
    • getCode

      public String getCode()
      Returns the status level abbreviation.
      Returns:
      the abbreviation
    • getLegs

      public int getLegs()
      Description copied from interface: EliteTotals
      Returns the number of flight legs.
      Specified by:
      getLegs in interface EliteTotals
      Returns:
      the number of legs
    • getDistance

      public int getDistance()
      Description copied from interface: EliteTotals
      Returns the distance flown.
      Specified by:
      getDistance in interface EliteTotals
      Returns:
      the distance in miles
    • getPoints

      public int getPoints()
      Description copied from interface: EliteTotals
      Returns the number of Elite points.
      Specified by:
      getPoints in interface EliteTotals
      Returns:
      the number of points
    • getColor

      public int getColor()
      Description copied from interface: RGBColor
      Returns the RGB color.
      Specified by:
      getColor in interface RGBColor
      Returns:
      a 24-bit RGB color value
    • getLevel

      public EliteLevel getLevel()
      Description copied from interface: EliteLevelBean
      Returns the Elite status level.
      Specified by:
      getLevel in interface EliteLevelBean
      Returns:
      the EliteLevel
    • setLevel

      public void setLevel(EliteLevel lvl)
      Description copied from interface: EliteLevelBean
      Updates the Elite status level.
      Specified by:
      setLevel in interface EliteLevelBean
      Parameters:
      lvl - the EliteLevel
    • setLegs

      public void setLegs(int l)
      Updates the number of lifetime flight legs required for this status.
      Parameters:
      l - the number of legs
    • setDistance

      public void setDistance(int d)
      Updates the number of lifetime flight distance required for this status.
      Parameters:
      d - the distance in miles
    • setName

      public void setName(String name)
      Updates the name of this status level.
      Parameters:
      name - the level name
      Throws:
      NullPointerException - if name is null
    • setCode

      public void setCode(String c)
      Updates the abbreviation of this status level.
      Parameters:
      c - the code
      Throws:
      NullPointerException - if name is null
    • getAuditID

      public String getAuditID()
      Description copied from interface: Auditable
      Returns the object ID for this auditable object.
      Specified by:
      getAuditID in interface Auditable
      Returns:
      the ID
    • hashCode

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

      public int compareTo(EliteLifetime el2)
      Specified by:
      compareTo in interface Comparable<EliteLifetime>