Record Class IWeightedGeneList.Entry
java.lang.Object
java.lang.Record
com.hexagram2021.chromosomelib.registry.IWeightedGeneList.Entry
- Enclosing interface:
- IWeightedGeneList
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.core.Holder<Gene>gene()Returns the value of thegenerecord component.final inthashCode()Returns a hash code value for this object.static IWeightedGeneList.Entryfinal StringtoString()Returns a string representation of this record class.intweight()Returns the value of theweightrecord component.
-
Constructor Details
-
Entry
Creates an instance of aEntryrecord class.- Parameters:
gene- the value for thegenerecord componentweight- the value for theweightrecord component
-
-
Method Details
-
of
-
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 '=='. -
gene
Returns the value of thegenerecord component.- Returns:
- the value of the
generecord component
-
weight
public int weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-