Enum Class ExperienceGroup
- All Implemented Interfaces:
Serializable
,Comparable<ExperienceGroup>
,Constable
Represents the different types of requirements for how much EXP it takes a pokemon to go up one pokemonLevel
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExperienceGroup
Gets the experience group with the given name (case insensitively) Will return null if none match the nameint
getExpForLevel
(int level) Calculates the experience required from a pokemonLevel to the next.int
getExpToLevel
(int level) Gets EXP required to go from 0 ->static boolean
hasExperienceGroup
(String group) Checks if the experience group with the given name existsstatic ExperienceGroup
Returns the enum constant of this class with the specified name.static ExperienceGroup[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ERRATIC
-
FAST
-
MEDIUM_FAST
-
MEDIUM_SLOW
-
SLOW
-
FLUCTUATING
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getExpForLevel
public int getExpForLevel(int level) Calculates the experience required from a pokemonLevel to the next.- Parameters:
level
- The pokemonLevel to calculate experience for.- Returns:
- The amount of experience required to pokemonLevel up from the specified pokemonLevel, or -1 if the pokemonLevel is out of bounds.
-
getExpToLevel
public int getExpToLevel(int level) Gets EXP required to go from 0 ->- Parameters:
level
- The pokemonLevel going to- Returns:
- The required EXP
-
hasExperienceGroup
Checks if the experience group with the given name exists- Parameters:
group
- The name of the group- Returns:
- True if it exists
-
getExperienceGroupFromString
Gets the experience group with the given name (case insensitively) Will return null if none match the name- Parameters:
group
- The name of the group- Returns:
- The found group
-