Record Class PlayerDataStorage.Experience
java.lang.Object
java.lang.Record
fr.fidorial.storage.player.PlayerDataStorage.Experience
- Record Components:
level- the experience levelprogress- how far towards the next level, from0to1excludedtotal- every experience point gained since the player last lost their experience
- Enclosing interface:
PlayerDataStorage
public static record PlayerDataStorage.Experience(int level, float progress, int total)
extends Record
The experience of a player.
- Since:
- 0.1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PlayerDataStorage.ExperienceNo experience at all: what a new player has. -
Constructor Summary
ConstructorsConstructorDescriptionExperience(int level, float progress, int total) Creates an instance of aExperiencerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intlevel()Returns the value of thelevelrecord component.floatprogress()Returns the value of theprogressrecord component.final StringtoString()Returns a string representation of this record class.inttotal()Returns the value of thetotalrecord component.
-
Field Details
-
NONE
No experience at all: what a new player has.- Since:
- 0.1.0
-
-
Constructor Details
-
Experience
-
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
level
-
progress
-
total
-