Record Class ItemDefaults.Properties
java.lang.Object
java.lang.Record
fr.fidorial.item.ItemDefaults.Properties
- Record Components:
maxStackSize- how many of this item fit in one slotmaxDamage- total durability,0when the item cannot break
- Enclosing class:
ItemDefaults
An item's defaults.
- Since:
- 0.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionProperties(int maxStackSize, int maxDamage) Creates an instance of aPropertiesrecord 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.intReturns the value of themaxDamagerecord component.intReturns the value of themaxStackSizerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Properties
public Properties(int maxStackSize, int maxDamage) Creates an instance of aPropertiesrecord class.- Parameters:
maxStackSize- the value for themaxStackSizerecord componentmaxDamage- the value for themaxDamagerecord 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. -
maxStackSize
public int maxStackSize()Returns the value of themaxStackSizerecord component.- Returns:
- the value of the
maxStackSizerecord component
-
maxDamage
-