Record Class GameContext
java.lang.Object
java.lang.Record
org.xxdc.oss.example.GameContext
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA builder for creating a game context. -
Constructor Summary
ConstructorsConstructorDescriptionGameContext(String id, long createdAt, Map<String, String> metadata) Creates an instance of aGameContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thecreatedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.metadata()Returns the value of themetadatarecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GameContext
-
-
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. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
createdAt
public long createdAt()Returns the value of thecreatedAtrecord component.- Returns:
- the value of the
createdAtrecord component
-
metadata
-