public final class HiscoreActivity
extends java.lang.Object
Hiscores
.Constructor and Description |
---|
HiscoreActivity(CSVRecord record)
Deprecated.
Use
fromCsv(CSVRecord) . |
HiscoreActivity(int rank,
int score)
Creates a new
HiscoreActivity . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
static java.util.Optional<HiscoreActivity> |
fromCsv(CSVRecord record)
Creates a
HiscoreActivity from a CSVRecord . |
java.util.OptionalInt |
getRank()
Gets the rank the player has in the activity.
|
java.util.OptionalInt |
getScore()
Gets the score the player has in the activity.
|
int |
hashCode() |
java.lang.String |
toString() |
public HiscoreActivity(int rank, int score)
HiscoreActivity
.rank
- The rank the player has in the activity.score
- The score the player has in the activity.@Deprecated public HiscoreActivity(CSVRecord record)
fromCsv(CSVRecord)
.HiscoreActivity
from a CSVRecord
.record
- The CSVRecord
.public static java.util.Optional<HiscoreActivity> fromCsv(CSVRecord record)
HiscoreActivity
from a CSVRecord
.record
- The record.HiscoreActivity
or Optional.empty()
if the record was invalid.public java.util.OptionalInt getRank()
OptionalInt
containing the player's rank, or OptionalInt.empty()
if the player is unranked for this activity.public java.util.OptionalInt getScore()
OptionalInt
containing the player's score, or OptionalInt.empty()
if the player is unranked for this activity.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