public final class Skill
extends java.lang.Object
Hiscores
.Modifier and Type | Field and Description |
---|---|
static long |
MAX_EXPERIENCE
The maximum amount of experience achievable in a single skill.
|
Constructor and Description |
---|
Skill(CSVRecord record)
Deprecated.
Use
fromCsv(CSVRecord) . |
Skill(int rank,
int level,
long experience)
Creates a new
Skill . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
static java.util.Optional<Skill> |
fromCsv(CSVRecord record)
|
java.util.OptionalLong |
getExperience()
Gets the amount of experience the player has earned in this skill.
|
int |
getLevel()
Gets the level the player has in this skill.
|
java.util.OptionalInt |
getRank()
Gets the rank the player has on the
Hiscores for this type of skill. |
int |
hashCode() |
java.lang.String |
toString() |
public static final long MAX_EXPERIENCE
public Skill(int rank, int level, long experience)
Skill
.rank
- The rank the player has on the Hiscores
for this type of skill.level
- The level the player has in this skill.experience
- The amount of experience the player has earned in this skill.@Deprecated public Skill(CSVRecord record)
fromCsv(CSVRecord)
.record
- The CSVRecord
.public static java.util.Optional<Skill> fromCsv(CSVRecord record)
record
- The record.Skill
or Optional.empty()
if the record was invalid.public java.util.OptionalInt getRank()
Hiscores
for this type of skill.OptionalInt
containing the player's rank, or OptionalInt.empty()
if the player is unranked.public int getLevel()
public java.util.OptionalLong getExperience()
OptionalLong
containing the amount of experience the player has earned in this skill, or
OptionalLong.empty()
if the player is unranked.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object