Record Class Game.PlayerMetadata
java.lang.Object
java.lang.Record
dev.despical.tntrun.game.Game.PlayerMetadata
- Enclosing class:
Game
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerMetadata(String name, int doubleJumps, int maxDoubleJumps) Creates an instance of aPlayerMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedoubleJumpsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxDoubleJumpsrecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PlayerMetadata
Creates an instance of aPlayerMetadatarecord class.- Parameters:
name- the value for thenamerecord componentdoubleJumps- the value for thedoubleJumpsrecord componentmaxDoubleJumps- the value for themaxDoubleJumpsrecord component
-
-
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. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
doubleJumps
public int doubleJumps()Returns the value of thedoubleJumpsrecord component.- Returns:
- the value of the
doubleJumpsrecord component
-
maxDoubleJumps
public int maxDoubleJumps()Returns the value of themaxDoubleJumpsrecord component.- Returns:
- the value of the
maxDoubleJumpsrecord component
-