Record Class RangeBrackets.ExpBracket
java.lang.Object
java.lang.Record
constants.RangeBrackets.ExpBracket
- Enclosing class:
RangeBrackets
public static record RangeBrackets.ExpBracket(int minLevel, int maxLevel, double rate)
extends Record
經驗區間倍率的一組區間:角色等級落在
[minLevel, maxLevel] 時所得經驗再乘上 rate。-
Constructor Summary
ConstructorsConstructorDescriptionExpBracket(int minLevel, int maxLevel, double rate) Creates an instance of aExpBracketrecord 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.intmaxLevel()Returns the value of themaxLevelrecord component.intminLevel()Returns the value of theminLevelrecord component.doublerate()Returns the value of theraterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ExpBracket
public ExpBracket(int minLevel, int maxLevel, double rate) Creates an instance of aExpBracketrecord class.- Parameters:
minLevel- the value for theminLevelrecord componentmaxLevel- the value for themaxLevelrecord componentrate- the value for theraterecord component
-
-
Method Details
-
toString
-
hashCode
-
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 with thecomparemethod from their corresponding wrapper classes. -
minLevel
public int minLevel()Returns the value of theminLevelrecord component.- Returns:
- the value of the
minLevelrecord component
-
maxLevel
public int maxLevel()Returns the value of themaxLevelrecord component.- Returns:
- the value of the
maxLevelrecord component
-
rate
public double rate()Returns the value of theraterecord component.- Returns:
- the value of the
raterecord component
-