java.lang.Object
java.lang.Record
chariot.model.GameStateEvent.Account
- All Implemented Interfaces:
GameStateEvent.Side
- Enclosing interface:
GameStateEvent
public static record GameStateEvent.Account(UserInfo user, int rating, boolean provisional)
extends Record
implements GameStateEvent.Side
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.name()
boolean
Returns the value of theprovisional
record component.int
rating()
Returns the value of therating
record component.final String
toString()
Returns a string representation of this record class.user()
Returns the value of theuser
record component.
-
Constructor Details
-
Account
Creates an instance of aAccount
record class.- Parameters:
user
- the value for theuser
record componentrating
- the value for therating
record componentprovisional
- the value for theprovisional
record component
-
-
Method Details
-
name
- Specified by:
name
in interfaceGameStateEvent.Side
-
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 '=='. -
user
Returns the value of theuser
record component.- Returns:
- the value of the
user
record component
-
rating
public int rating()Returns the value of therating
record component.- Returns:
- the value of the
rating
record component
-
provisional
public boolean provisional()Returns the value of theprovisional
record component.- Returns:
- the value of the
provisional
record component
-