Enum Class Rank

java.lang.Object
java.lang.Enum<Rank>
org.deltava.beans.Rank
All Implemented Interfaces:
Serializable, Comparable<Rank>, Constable

public enum Rank extends Enum<Rank>
An enumeration for rank names.
Since:
1.0
Version:
7.2
Author:
Luke
  • Enum Constant Details

    • FO

      public static final Rank FO
    • C

      public static final Rank C
    • SC

      public static final Rank SC
    • ACP

      public static final Rank ACP
    • CP

      public static final Rank CP
  • Method Details

    • values

      public static Rank[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Rank valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getName

      public String getName()
      Returns the rank name.
      Returns:
      the name
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Rank>
    • equals

      public boolean equals(String s2)
      Compares this rank to a text name.
      Parameters:
      s2 - the text name
      Returns:
      TRUE if the code or name equals the supplied name, otherwise FALSE
    • isCP

      public boolean isCP()
      Returns if this is a Chief Pilot or Assistant Chief Pilot rank.
      Returns:
      TRUE if equals ACP or CP, otherwise FALSE
    • fromName

      public static Rank fromName(String s)
      Gets a rank from a name.
      Parameters:
      s - the name
      Returns:
      a Rank, or null if unknown