Class Inventory
java.lang.Object
org.rspeer.game.adapter.Adapter<jag.oldscape.RSInventory>
org.rspeer.game.adapter.component.inventory.Inventory
- Direct Known Subclasses:
Backpack, Bank, Equipment, NullSafeInventory
A class for the manipulation of item containers.
This includes but is not limited to inventory, bank and equipment.
Please note that static lookup methods in this class are null-safe
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionInventory(jag.oldscape.RSInventory provider, Inventory.Format format, boolean extractFromProvider, List<InventoryType.ItemComponentLookup> queries) Inventory(jag.oldscape.RSInventory provider, Inventory.Format format, Consumer<Item> function, boolean extractFromProvider, List<InventoryType.ItemComponentLookup> queries) -
Method Summary
Modifier and TypeMethodDescriptionstatic Backpackbackpack()Deprecated.static Bankbank()Deprecated.booleancontains(Function<ItemQuery, ItemQueryResults> function) final booleancontainsAll(Function<ItemQuery, ItemQueryResults>... functions) static EquipmentDeprecated.voidstatic Inventoryget(int key, Inventory.Format format, boolean extractFromProvider, List<InventoryType.ItemComponentLookup> queries) Deprecated.static Inventoryget(InventoryType composite) Deprecated.static Inventoryget(InventoryType composite, boolean extractFromProvider) Deprecated.intintgetCount(Function<ItemQuery, ItemQueryResults> function) intgetCount(Function<ItemQuery, ItemQueryResults> function, boolean includeStacks) intgetItems()getItems(int... ids) intgetKey()static Itembooleaninteract(Function<ItemQuery, ItemQueryResults> function, String action) booleanisEmpty()booleanisFull()static booleanbooleanisLoaded()booleanquery()static ItemQueryqueryOf(InventoryType type) Deprecated.static ItemQueryqueryOf(InventoryType type, boolean extractFromProvider) Deprecated.voidsetExtractFromProvider(boolean extractFromProvider) voidsetQueries(List<InventoryType.ItemComponentLookup> queries) toString()Methods inherited from class Adapter
getProvider, validate
-
Constructor Details
-
Inventory
public Inventory(jag.oldscape.RSInventory provider, Inventory.Format format, Consumer<Item> function, boolean extractFromProvider, List<InventoryType.ItemComponentLookup> queries) -
Inventory
public Inventory(jag.oldscape.RSInventory provider, Inventory.Format format, boolean extractFromProvider, List<InventoryType.ItemComponentLookup> queries)
-
-
Method Details
-
backpack
Deprecated. -
equipment
Deprecated. -
bank
Deprecated. -
queryOf
Deprecated. -
queryOf
Deprecated. -
get
@Deprecated public static Inventory get(int key, Inventory.Format format, boolean extractFromProvider, List<InventoryType.ItemComponentLookup> queries) Deprecated. -
get
Deprecated. -
get
Deprecated. -
isItemSelected
public static boolean isItemSelected() -
getSelectedItem
-
setQueries
-
forceDefaultProvider
public void forceDefaultProvider() -
defaultProvider
-
setExtractFromProvider
public void setExtractFromProvider(boolean extractFromProvider) -
interact
-
getKey
public int getKey() -
isUnbound
public boolean isUnbound() -
getCapacity
public int getCapacity() -
getEmptySlots
public int getEmptySlots() -
getCount
-
getCount
-
contains
-
containsAll
-
isFull
public boolean isFull() -
isEmpty
public boolean isEmpty() -
isLoaded
public boolean isLoaded() -
getItems
-
getItems
-
getItems
-
getItems
-
query
-
toString
-