Package com.wdiscute.starcatcher.data
Record Class CaughtFishInfo
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.data.CaughtFishInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CaughtFishInfostatic final com.mojang.serialization.Codec<CaughtFishInfo> static final CaughtFishInfo -
Constructor Summary
ConstructorsConstructorDescriptionCaughtFishInfo(float size, float weight, float percentile, Rarity rarity) Creates an instance of aCaughtFishInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.floatgetScale()booleangolden()final inthashCode()Returns a hash code value for this object.floatReturns the value of thepercentilerecord component.rarity()Returns the value of therarityrecord component.floatsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.floatweight()Returns the value of theweightrecord component.
-
Field Details
-
GOLDEN
-
AVERAGE
-
CODEC
-
-
Constructor Details
-
CaughtFishInfo
Creates an instance of aCaughtFishInforecord class.- Parameters:
size- the value for thesizerecord componentweight- the value for theweightrecord componentpercentile- the value for thepercentilerecord componentrarity- the value for therarityrecord component
-
-
Method Details
-
getScale
public float getScale() -
golden
public boolean golden() -
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 '=='. -
size
public float size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
weight
public float weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-
percentile
public float percentile()Returns the value of thepercentilerecord component.- Returns:
- the value of the
percentilerecord component
-
rarity
Returns the value of therarityrecord component.- Returns:
- the value of the
rarityrecord component
-