Enum Class AchievementType

java.lang.Object
java.lang.Enum<AchievementType>
org.strassburger.cookieclickerz.util.achievements.AchievementType
All Implemented Interfaces:
Serializable, Comparable<AchievementType>, java.lang.constant.Constable

public enum AchievementType extends Enum<AchievementType>
  • Enum Constant Details

  • Method Details

    • values

      public static AchievementType[] 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 AchievementType 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
    • getSlug

      public String getSlug()
    • getCategory

      public AchievementCategory getCategory()
    • isHidden

      public boolean isHidden()
    • getGoal

      public Number getGoal()
    • getBigIntegerGoal

      public BigInteger getBigIntegerGoal()
      Get the goal as a BigInteger
      Returns:
      the goal as a BigInteger
    • getIntGoal

      public int getIntGoal() throws UnsupportedOperationException
      Get the goal as an integer
      Returns:
      the goal as an integer
      Throws:
      UnsupportedOperationException - if the goal is a BigInteger
    • getBySlug

      public static Optional<AchievementType> getBySlug(String slug)
      Get the achievement type by its slug
      Parameters:
      slug - the slug of the achievement type
      Returns:
      the achievement type if found, otherwise an empty optional
    • getByCategory

      public static List<AchievementType> getByCategory(AchievementCategory category)
      Get all achievements of a specific category
      Parameters:
      category - the category to filter by
      Returns:
      a list of achievements of the specified category
    • getAll

      public static List<AchievementType> getAll()
    • toString

      public String toString()
      Overrides:
      toString in class Enum<AchievementType>