Record Class Inventory
java.lang.Object
java.lang.Record
com.botwithus.bot.api.snapshot.Inventory
- Record Components:
invId- game-side inventory id (matchesInventoryIds)slotCount- declared slot count for this containeritems- one entry per slot in[0, slotCount); empty slots haveitemId == -1. Defensive copy is taken.
Snapshot of one inventory container.
-
Constructor Summary
ConstructorsConstructorDescriptionInventory(int invId, int slotCount, List<InventoryItem> items) Creates an instance of aInventoryrecord 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.intinvId()Returns the value of theinvIdrecord component.items()Returns the value of theitemsrecord component.intReturns the value of theslotCountrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
invId
-
slotCount
-
items
-