Record Class InventoryItem
java.lang.Object
java.lang.Record
com.botwithus.bot.api.snapshot.InventoryItem
- Record Components:
slot- slot index within the parentInventoryitemId- item definition id, or-1for an empty slotquantity- stack size;0whenisEmpty()
One slot of an inventory snapshot.
-
Constructor Summary
ConstructorsConstructorDescriptionInventoryItem(int slot, int itemId, int quantity) Creates an instance of aInventoryItemrecord 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.booleanisEmpty()intitemId()Returns the value of theitemIdrecord component.intquantity()Returns the value of thequantityrecord component.intslot()Returns the value of theslotrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
InventoryItem
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
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. -
slot
-
itemId
-
quantity
-