Enum Class Appetite

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

public enum Appetite extends Enum<Appetite>
Indicates the appetite of a person.
Author:
maartenl
  • Enum Constant Details

    • HUNGRY

      public static final Appetite HUNGRY
    • EAT_WHOLE_LOT_MORE

      public static final Appetite EAT_WHOLE_LOT_MORE
    • EAT_LOT_MORE

      public static final Appetite EAT_LOT_MORE
    • EAT_SOME

      public static final Appetite EAT_SOME
    • EAT_LITTLE

      public static final Appetite EAT_LITTLE
    • FULL

      public static final Appetite FULL
  • Method Details

    • values

      public static Appetite[] 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 Appetite 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()
    • getAppetite

      public static Appetite getAppetite(Integer appetite)
      Returns the appetite of the character. Must be a number between 0 and 5999, where 0..999 is HUNGRY and 5000..5999 is FULL.
      Returns:
      Appetite enum.
      Throws:
      RuntimeException - if the appetite is not allowed
      NullPointerException - if appetite not provided
    • get

      public static Appetite get(Integer appetite)
      Returns the appetite based on provided ordinal value.
      Returns:
      Appetite enum or null if not found.
    • get

      public static Appetite get(String appetite)
      Returns the appetite based on a description.
      Returns:
      Appetite enum or null if not found.
    • getDescription

      public String getDescription()
      Returns the description of this enum.
      Returns:
      for example "at death's door"
    • getOrdinalValue

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