Class ItemCache
- java.lang.Object
-
- org.rspeer.game.service.inventory.ItemCache
-
-
Constructor Summary
Constructors Constructor Description ItemCache(int capacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(Function<ItemQuery,ItemQueryResults> function)intgetCount(Function<ItemQuery,ItemQueryResults> function)intgetCount(Function<ItemQuery,ItemQueryResults> function, boolean includeStacks)intgetRemainingSlots()intgetSlotCount()intgetValidSlotCount()List<Item>getValidSlots()booleanisLoaded()Iterator<Item>iterator()ItemQueryquery()Stream<Item>stream()voidupdate(int slot, int id, int amount)voidupdate(RSInventory inventory)voidupdate(InventoryEvent event)-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
update
public void update(InventoryEvent event)
-
update
public void update(RSInventory inventory)
-
update
public void update(int slot, int id, int amount)
-
getValidSlotCount
public int getValidSlotCount()
-
getRemainingSlots
public int getRemainingSlots()
-
getSlotCount
public int getSlotCount()
-
contains
public boolean contains(Function<ItemQuery,ItemQueryResults> function)
-
getCount
public int getCount(Function<ItemQuery,ItemQueryResults> function)
-
getCount
public int getCount(Function<ItemQuery,ItemQueryResults> function, boolean includeStacks)
-
isLoaded
public boolean isLoaded()
-
query
public ItemQuery query()
-
-