Record Class RangeBrackets.StackRange
java.lang.Object
java.lang.Record
constants.RangeBrackets.StackRange
- Enclosing class:
RangeBrackets
道具堆疊上限覆寫的一組區間:道具 ID 落在
[minId, maxId] 者每格最多堆疊 slotMax 個。-
Constructor Summary
ConstructorsConstructorDescriptionStackRange(int minId, int maxId, int slotMax) Creates an instance of aStackRangerecord 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.intmaxId()Returns the value of themaxIdrecord component.intminId()Returns the value of theminIdrecord component.intslotMax()Returns the value of theslotMaxrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StackRange
public StackRange(int minId, int maxId, int slotMax) Creates an instance of aStackRangerecord class.- Parameters:
minId- the value for theminIdrecord componentmaxId- the value for themaxIdrecord componentslotMax- the value for theslotMaxrecord 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. -
minId
public int minId()Returns the value of theminIdrecord component.- Returns:
- the value of the
minIdrecord component
-
maxId
public int maxId()Returns the value of themaxIdrecord component.- Returns:
- the value of the
maxIdrecord component
-
slotMax
public int slotMax()Returns the value of theslotMaxrecord component.- Returns:
- the value of the
slotMaxrecord component
-