Package forestry.api.apiculture.hives
Record Class VillageHive
java.lang.Object
java.lang.Record
forestry.api.apiculture.hives.VillageHive
public record VillageHive(net.minecraft.resources.ResourceLocation speciesId, Map<IChromosome<?>,Allele<?>> alleles)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionVillageHive(net.minecraft.resources.ResourceLocation speciesId, Map<IChromosome<?>, Allele<?>> alleles) Creates an instance of aVillageHiverecord class. -
Method Summary
Modifier and TypeMethodDescriptionMap<IChromosome<?>, Allele<?>> alleles()Returns the value of theallelesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationReturns the value of thespeciesIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
VillageHive
public VillageHive(net.minecraft.resources.ResourceLocation speciesId, Map<IChromosome<?>, Allele<?>> alleles) Creates an instance of aVillageHiverecord class.- Parameters:
speciesId- the value for thespeciesIdrecord componentalleles- the value for theallelesrecord 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 withObjects::equals(Object,Object). -
speciesId
public net.minecraft.resources.ResourceLocation speciesId()Returns the value of thespeciesIdrecord component.- Returns:
- the value of the
speciesIdrecord component
-
alleles
Returns the value of theallelesrecord component.- Returns:
- the value of the
allelesrecord component
-