Package com.wdiscute.starcatcher.guide
Record Class FishingGuideScreen.StatsData
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.guide.FishingGuideScreen.StatsData
- Enclosing class:
FishingGuideScreen
public static record FishingGuideScreen.StatsData(int timeSpent, int treasuresCaught, int fishMissed, int baitUsed)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<FishingGuideScreen.StatsData> -
Constructor Summary
ConstructorsConstructorDescriptionStatsData(int timeSpent, int treasuresCaught, int fishMissed, int baitUsed) Creates an instance of aStatsDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionintbaitUsed()Returns the value of thebaitUsedrecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefishMissedrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of thetimeSpentrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetreasuresCaughtrecord component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
StatsData
public StatsData(int timeSpent, int treasuresCaught, int fishMissed, int baitUsed) Creates an instance of aStatsDatarecord class.- Parameters:
timeSpent- the value for thetimeSpentrecord componenttreasuresCaught- the value for thetreasuresCaughtrecord componentfishMissed- the value for thefishMissedrecord componentbaitUsed- the value for thebaitUsedrecord 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. All components in this record class are compared with '=='. -
timeSpent
public int timeSpent()Returns the value of thetimeSpentrecord component.- Returns:
- the value of the
timeSpentrecord component
-
treasuresCaught
public int treasuresCaught()Returns the value of thetreasuresCaughtrecord component.- Returns:
- the value of the
treasuresCaughtrecord component
-
fishMissed
public int fishMissed()Returns the value of thefishMissedrecord component.- Returns:
- the value of the
fishMissedrecord component
-
baitUsed
public int baitUsed()Returns the value of thebaitUsedrecord component.- Returns:
- the value of the
baitUsedrecord component
-