Package com.enhancedechest.service
Record Class PlayerNameIndex.NameEntry
java.lang.Object
java.lang.Record
com.enhancedechest.service.PlayerNameIndex.NameEntry
- Enclosing class:
PlayerNameIndex
public static record PlayerNameIndex.NameEntry(UUID uuid, String displayName, long lastOnline)
extends Record
One recorded player: their current known name, UUID, and the epoch-ms they were last seen
(
0 when never recorded — a row that predates last-online tracking).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of thelastOnlinerecord component.final StringtoString()Returns a string representation of this record class.uuid()Returns the value of theuuidrecord component.
-
Constructor Details
-
NameEntry
Creates an instance of aNameEntryrecord class.- Parameters:
uuid- the value for theuuidrecord componentdisplayName- the value for thedisplayNamerecord componentlastOnline- the value for thelastOnlinerecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
uuid
Returns the value of theuuidrecord component.- Returns:
- the value of the
uuidrecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
lastOnline
public long lastOnline()Returns the value of thelastOnlinerecord component.- Returns:
- the value of the
lastOnlinerecord component
-