Record Class GameStats
java.lang.Object
java.lang.Record
lol.trq.alts.model.GameStats
- Record Components:
serverId- an identifier for the server these stats are for (a label the source stamps)uuid- the player UUID these stats belong tostats- the ordered display chips; may be emptyfetchedAt- the epoch-millis the source produced this snapshot
public record GameStats(String serverId, String uuid, List<GameStats.Stat> stats, long fetchedAt)
extends Record
A server-agnostic snapshot of an account's public stats on one server, modelled as an ordered list of
display
GameStats.Stat chips. The library never interprets the chips: a host-side
GameStatsSource produces them ready to render (it holds any API key and knows
the server's format), and the library only models and caches the result. This keeps the core usable
with any server, not just one.
Everything here is optional in spirit: stats may be empty (the player exists but has nothing
notable), and a source may decline to produce stats at all.
- Since:
- 0.3.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA single display chip: a short label and its value, for example("rank", "Veteran")or("wins", "128"). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longReturns the value of thefetchedAtrecord component.final inthashCode()Returns a hash code value for this object.serverId()Returns the value of theserverIdrecord component.stats()Returns the value of thestatsrecord component.final StringtoString()Returns a string representation of this record class.uuid()Returns the value of theuuidrecord component.
-
Constructor Details
-
GameStats
Takes its own copy ofstats, unmodifiable, so neither the list it was built from nor the onestats()returns can change the snapshot.nullstaysnull.- Since:
- 0.3.0
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
serverId
-
uuid
-
stats
-
fetchedAt
-