Enum Class Sobriety

Object
Enum<Sobriety>
Sobriety
All Implemented Interfaces:
Serializable, Comparable<Sobriety>, Constable

public enum Sobriety extends Enum<Sobriety>
Indicates how drunk you are, or how thirsty.
Author:
maartenl
  • Enum Constant Details

    • TOTALLY_DRUNK

      public static final Sobriety TOTALLY_DRUNK
    • VERY_DRUNK

      public static final Sobriety VERY_DRUNK
    • DRUNK

      public static final Sobriety DRUNK
    • PISSED

      public static final Sobriety PISSED
    • LITTLE_DRUNK

      public static final Sobriety LITTLE_DRUNK
    • INEBRIATED

      public static final Sobriety INEBRIATED
    • HEADACHE

      public static final Sobriety HEADACHE
    • THIRSTY

      public static final Sobriety THIRSTY
    • DRINK_WHOLE_LOT_MORE

      public static final Sobriety DRINK_WHOLE_LOT_MORE
    • DRINK_MORE

      public static final Sobriety DRINK_MORE
    • DRINK_COME

      public static final Sobriety DRINK_COME
    • DRINK_LITTLE

      public static final Sobriety DRINK_LITTLE
    • NO_DRINK

      public static final Sobriety NO_DRINK
  • Method Details

    • values

      public static Sobriety[] 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 Sobriety 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
    • min

      public static Integer min()
    • max

      public static Integer max()
    • getSobriety

      public static Sobriety getSobriety(Integer sobriety)
      Returns the thirstiness of the character. Must be a number between -5999 and 5999, where -5999..-5000 is out of your skull on alcohol and 5000..5999 is no longer able to drink.
      Returns:
      Sobriety enum.
      Throws:
      RuntimeException - if the movement is not allowed
      NullPointerException - if movement not provided
    • getDescription

      public String getDescription()
      Returns the description of this enum.
      Returns:
      for example "You can drink some more."
    • getOrdinalValue

      public int getOrdinalValue()
      Returns the integer indicating the sobriety.
      Returns:
      integer