AI-generated Key Takeaways
-
PlayerLevel is a data object representing a player's level in a game's metagame.
-
A PlayerLevel is defined by a numeric value and a range of XP, specifically from a minimum XP (inclusive) up to a maximum XP (exclusive).
-
Players are considered to be a given level if their current XP falls within the level's defined XP range.
-
The class includes methods to retrieve the level number, the minimum XP for the level, and the maximum XP for the level.
Data object representing a level a player can obtain in the metagame.
A PlayerLevel
has three components: a numeric value, and a range of XP totals
it represents. A player is considered a given level if they have at least
getMinXp()
and less than
getMaxXp()
.
Inherited Constant Summary
Field Summary
| public static final Creator < PlayerLevel > | CREATOR |
Public Method Summary
| boolean | |
| int | |
| long | |
| long | |
| int | hashCode
()
|
| String | toString
()
|
| void |
Inherited Method Summary
Fields
public static final Creator < PlayerLevel > CREATOR
Public Methods
public boolean equals ( Object obj)
public int getLevelNumber ()
Returns the number for this level, e.g. "level 10".
This is the level that this object represents. For a player to be considered as
being of this level, the value given by PlayerLevelInfo.getCurrentXpTotal()
must fall in the range [ getMinXp()
, getMaxXp()
).
Returns
- The level number for this level.
public long getMaxXp ()
Returns the maximum XP value represented by this level, exclusive.
public long getMinXp ()
Returns the minimum XP value needed to attain this level, inclusive.

