Record Class Skilltree.UpgradeEntry
java.lang.Object
java.lang.Record
de.Keyle.MyPet.api.skill.skilltree.Skilltree.UpgradeEntry
- Record Components:
rule- decides which levels the upgrade applies atupgrade- the upgrade to apply
- Enclosing class:
Skilltree
A level-gated upgrade binding. Stored as a list entry (not a map key) because two
different skills may share an identical
LevelRule, which must stay distinct.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUpgradeEntry(LevelRule rule, Upgrade<?> upgrade) Creates an instance of aUpgradeEntryrecord class. -
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.rule()Returns the value of therulerecord component.final StringtoString()Returns a string representation of this record class.Upgrade<?> upgrade()Returns the value of theupgraderecord component.
-
Constructor Details
-
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). -
rule
Returns the value of therulerecord component.- Returns:
- the value of the
rulerecord component
-
upgrade
Returns the value of theupgraderecord component.- Returns:
- the value of the
upgraderecord component
-