Package me.qscbm.inlayx.talisman
Record Class TalismanEffect.BonusEntry
java.lang.Object
java.lang.Record
me.qscbm.inlayx.talisman.TalismanEffect.BonusEntry
- Enclosing class:
TalismanEffect
成功率加成效果.
-
Constructor Summary
ConstructorsConstructorDescriptionBonusEntry(String id, double bonus, int uses) Creates an instance of aBonusEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublebonus()Returns the value of thebonusrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.intuses()Returns the value of theusesrecord component.
-
Constructor Details
-
BonusEntry
Creates an instance of aBonusEntryrecord class.- Parameters:
id- the value for theidrecord componentbonus- the value for thebonusrecord componentuses- the value for theusesrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
bonus
public double bonus()Returns the value of thebonusrecord component.- Returns:
- the value of the
bonusrecord component
-
uses
public int uses()Returns the value of theusesrecord component.- Returns:
- the value of the
usesrecord component
-