Record Class TierDefinition
java.lang.Object
java.lang.Record
org.ppvon.ultimateCobblemonProgression.api.TierDefinition
- Record Components:
index- the tier index (1-based)levelCap- the level cap for the tierspecies- the list of species identifiers in the tier
public record TierDefinition(int index, int levelCap, Set<net.minecraft.resources.ResourceLocation> species)
extends Record
Immutable definition of a trainer tier
- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionTierDefinition(int index, int levelCap, Set<net.minecraft.resources.ResourceLocation> species) Canonical constructor ensuring the species set is unmodifiable. -
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.intindex()Returns the value of theindexrecord component.intlevelCap()Returns the value of thelevelCaprecord component.Set<net.minecraft.resources.ResourceLocation> species()Returns the value of thespeciesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TierDefinition
public TierDefinition(int index, int levelCap, Set<net.minecraft.resources.ResourceLocation> species) Canonical constructor ensuring the species set is unmodifiable.- Parameters:
index- the tier index (1-based)levelCap- the level cap for the tierspecies- the list of species identifiers in the tier
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
levelCap
public int levelCap()Returns the value of thelevelCaprecord component.- Returns:
- the value of the
levelCaprecord component
-
species
Returns the value of thespeciesrecord component.- Returns:
- the value of the
speciesrecord component
-