Class Bank


  • public class Bank
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Bank()
      Deprecated.
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static void add​(int index, Item t)  
      static boolean add​(Item t)  
      static boolean addToBankHistoryCache​(Item item)
      This allows you to add an item to the bank history cache, it should only be necessary if you're doing things outside of our API
      static java.util.List<Item> all()
      Gets the items in your inventory
      static java.util.List<Item> all​(Filter<Item> filter)
      A list of all the items.
      static int availableTabs()
      Gets the number of tabs currently available
      static java.awt.Rectangle calculateSlotPosition​(int slot)
      Gets the virtual position for the specified slot.
      static int capacity()  
      static boolean close()
      Exits the bank with the close button.
      static boolean contains​(int id)
      Contains boolean.
      static boolean contains​(java.lang.Integer... ids)
      Checks if your collection contains one item which meets one of the specified ids.
      static boolean contains​(java.lang.Object o)  
      static boolean contains​(java.lang.String string)
      Determines if collection contains item with specified name.
      static boolean contains​(java.lang.String... names)
      Checks if your collection contains one item which meets one of the specified names.
      static boolean contains​(Filter<Item> filter)
      Checks if your collection contains one item which meets the specified filter.
      static boolean containsAll​(int... ids)
      Checks if your Bank contains all of the items with specified IDs
      static boolean containsAll​(java.lang.String... names)
      Checks if your Bank contains all of the items with names specified
      static boolean containsAll​(java.util.Collection<?> collection)
      Checks if your collection contains all of the items in the collections
      static int count​(int id)
      Count of all the items that match the search.
      static int count​(java.lang.String name)
      Count of all the items that match the search.
      static int count​(BankTab tab)
      Gets the Item count for the BankTab
      static int count​(Filter<Item> filter)
      Count of all the items that match the search.
      static boolean deposit​(int id)  
      static boolean deposit​(int id, int amount)  
      static boolean deposit​(java.lang.String name)  
      static boolean deposit​(java.lang.String name, int amount)  
      static boolean deposit​(Filter<Item> filter)  
      static boolean deposit​(Filter<Item> filter, int amount)
      Deposits the item specified by the item id and amount.
      static boolean deposit​(Item item)  
      static boolean deposit​(Item item, int amount)  
      static boolean depositAll​(int id)  
      static boolean depositAll​(java.lang.String name)  
      static boolean depositAll​(Filter<Item> filter)  
      static boolean depositAll​(Item item)  
      static boolean depositAllEquipment()
      Deposits all worn equipment with the deposit all equipment button.
      static boolean depositAllExcept​(java.lang.Integer... ids)  
      static boolean depositAllExcept​(java.lang.String... names)  
      static boolean depositAllExcept​(Filter<Item> filter)  
      static boolean depositAllItems()
      Deposits all items in your inventory with the deposit all button.
      static int emptySlotCount()
      Empty slot count.
      static java.util.List<Item> except​(Filter<Item> filter)
      Get all items which do not fit the given criteria.
      static int fullSlotCount()
      Full slot count.
      static Item get​(int id)  
      static Item get​(java.lang.Integer... ids)  
      static Item get​(java.lang.String name)
      Get item for specified name.
      static Item get​(java.lang.String... names)  
      static Item get​(Filter<Item> filter)  
      static Bank getBank()
      Deprecated.
      static java.util.List<Item> getBankHistoryCache()
      Gets the bank item history cache.
      static WidgetChild getChild​(int id)
      Gets the WidgetChild of the Item
      static WidgetChild getChild​(java.lang.String name)
      Gets the WidgetChild of the Item
      static WidgetChild getChild​(Filter<Item> filter)
      Gets the WidgetChild of the Item
      static WidgetChild getChild​(Item item)
      Gets the WidgetChild of the Item
      static Entity getClosestBank​(BankType type)
      Gets the nearest bank interactable based on BankType
      static BankLocation getClosestBankLocation()
      Get closest bank location.
      static BankTab getCurrentBankTab()
      Gets the current BankTab
      static int getCurrentTab()
      Gets the current tab that is open
      static BankQuantitySelection getDefaultQuantity()  
      static int getFirstEmptySlot()
      Gets the first empty slot in your inventory.
      static int getFirstFullSlot()
      Gets the next full slot in your inventory
      static int getIdForSlot​(int slot)
      Gets the Id of the Item in the slot.
      static Item getItemInSlot​(int index)
      Gets item in specified slot.
      static long getLastBankHistoryCacheTime()
      Returns the last timestamp (using System#currentTimeMillis) of a cache update
      static java.lang.String getNameForSlot​(int slot)
      Gets the Name for the Item in the slot.
      static BankMode getRearrangeMode()
      Gets the current rearrange mode type;
      static int getRow​(Item item)
      Gets the row of the Item
      static int getScrollHeight()
      Determines the current scroll position height of the bank's scroll container.
      static int getTab​(Item item)
      Gets the tab for the item
      static BankMode getWithdrawMode()
      Gets the current withdraw mode.
      static boolean isEmpty()  
      static boolean isFull()
      Determines if container full.
      static boolean isOpen()
      Checks if the bank is currently open or not.
      static boolean isSlotEmpty​(int slot)  
      static boolean isSlotFull​(int slot)
      Checks if the slot has an Item in it
      static boolean isSlotVisible​(Item item)
      Determines whether or not offset specific slot is visible, defined by the item.
      static boolean needToScroll​(Item item)
      Determines if the bot needs to scroll to find offset slot.
      static boolean needToScrollDown​(Item item)
      Determines whether or not the bot should scroll down to find the slot given.
      static boolean needToScrollUp​(Item item)
      Determines whether or not the bot should scroll up to find the slot given.
      static boolean onlyContains​(java.lang.Integer... id)
      Checks if your Bank only contains items with specified ID
      static boolean onlyContains​(java.lang.String... names)
      Checks if your Bank only contains items with specified name
      static boolean onlyContains​(Filter<Item> f)
      Checks if your Bank only contains items that match the Filter
      static boolean open()
      Opens the closest bank to your character.
      static boolean open​(BankLocation bank)
      Opens a specific bank location, if you're not in the area it will call walk(Tile) and return false
      static boolean openClosest()
      Opens the closest bank to your current position
      static boolean openTab​(int tab)
      Opens the bank tab specified
      static boolean openTab​(BankTab tab)
      Opens the BankTab specified.
      static boolean placeHoldersEnabled()  
      static void resetCache()
      This will reset the bank history cache to it's initial state
      static boolean scroll​(int id)
      Scrolls to the item which matches the given filter.
      static boolean scroll​(int id, BankScroll type)
      Scrolls to the item which matches the given filter.
      static boolean scroll​(java.lang.String name)
      Scrolls to the item which matches the given filter.
      static boolean scroll​(java.lang.String name, BankScroll type)
      Scrolls to the item which matches the given filter.
      static boolean scroll​(Filter<Item> filter)
      Scrolls to the item which matches the given filter.
      static boolean scroll​(Filter<Item> filter, BankScroll type)
      Scrolls to the item which matches the given filter.
      static Item set​(int index, Item element)  
      static boolean setDefaultQuantity​(BankQuantitySelection selection)  
      static boolean setRearrangeMode​(BankMode mode)
      Sets the Rearrange mode for the bank.
      static void setUseBankHistoryCache​(boolean useCache)
      Set whether or not our methods use the Bank cache if you call a method while not in the bank
      static boolean setWithdrawMode​(BankMode mode)
      Sets the withdraw mode
      static int size()  
      static int slot​(int id)
      Gets the slot for the item with specified ID.
      static int slot​(java.lang.String name)
      Gets the slot for the item with specified name.
      static int slot​(Filter<Item> filter)
      Gets the slot for the item with specified name.
      static java.awt.Rectangle slotBounds​(int slot)
      Gets the bounds of a slot
      static java.awt.Rectangle slotBounds​(Item item)
      Gets the bounds of a slot
      static boolean slotContains​(int slot, java.lang.Integer... ids)
      Checks if the slot contains items that matches the given ids.
      static boolean slotContains​(int slot, java.lang.String... names)
      Checks if the slot contains items that matches the given names.
      static boolean slotContains​(int slot, Filter<Item> filter)
      Checks if the slot contains items that matches the filter.
      static boolean slotContains​(int slot, Item t)
      Checks if the slot contains items that matches the given ids.
      static boolean slotNameContains​(int slot, java.lang.String sub)
      Checks if the slot contains items that matches the given ids.
      static int tabContainerWidgetId()  
      static java.lang.Object[] toArray()  
      static boolean togglePlaceholders​(boolean enabled)  
      static int widgetChildId()  
      static int widgetParentId()  
      static boolean withdraw​(int id)
      Withdraws an item for the id and amount given.
      static boolean withdraw​(int id, int amount)
      Withdraws an item for the id and amount given.
      static boolean withdraw​(java.lang.String name)
      Withdraws an item for the id and amount given.
      static boolean withdraw​(java.lang.String name, int amount)
      Withdraws an item for the id and amount given.
      static boolean withdraw​(Filter<Item> filter)
      Withdraws an item for the id and amount given.
      static boolean withdraw​(Filter<Item> filter, int amount)
      Withdraws an item for the id and amount given.
      static boolean withdrawAll​(int id)
      Withdraws all of a item for the id and amount given.
      static boolean withdrawAll​(java.lang.String name)
      Withdraws all of a item for the name and amount given.
      static boolean withdrawAll​(Filter<Item> filter)
      Withdraws all items for the id given.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Bank

        @Deprecated
        public Bank()
        Deprecated.
    • Method Detail

      • getBank

        @Deprecated
        public static Bank getBank()
        Deprecated.
        Returns the active Bank instance
        Returns:
        bank instance
      • widgetParentId

        public static int widgetParentId()
      • widgetChildId

        public static int widgetChildId()
      • tabContainerWidgetId

        public static int tabContainerWidgetId()
      • capacity

        public static int capacity()
      • setUseBankHistoryCache

        public static void setUseBankHistoryCache​(boolean useCache)
        Set whether or not our methods use the Bank cache if you call a method while not in the bank
        Parameters:
        useCache - true (default) if you want to use the cache if available, false otherwise
      • all

        public static java.util.List<Item> all()
        Gets the items in your inventory
        Returns:
        list of all items in your inventory.
      • calculateSlotPosition

        public static java.awt.Rectangle calculateSlotPosition​(int slot)
        Gets the virtual position for the specified slot.
        Parameters:
        slot - The slot to find the position for.
        Returns:
        The rectangle object of the slot.
      • resetCache

        public static void resetCache()
        This will reset the bank history cache to it's initial state
      • isOpen

        public static boolean isOpen()
        Checks if the bank is currently open or not.
        Returns:
        True if bank interface is open, else False
      • getClosestBank

        public static Entity getClosestBank​(BankType type)
        Gets the nearest bank interactable based on BankType
        Parameters:
        type - bank type to look for
        Returns:
        entity of closest bank object
      • open

        public static boolean open()
        Opens the closest bank to your character.
        Returns:
        true if the bank is open, otherwise false.
      • open

        public static boolean open​(BankLocation bank)
        Opens a specific bank location, if you're not in the area it will call walk(Tile) and return false
        Parameters:
        bank - BankLocation that you want to open/go to
        Returns:
        True if opens successfully, else false
      • openClosest

        public static boolean openClosest()
        Opens the closest bank to your current position
        Returns:
        see open(BankLocation bank)
      • getClosestBankLocation

        public static BankLocation getClosestBankLocation()
        Get closest bank location.
        Returns:
        the bank location closest to your player.
      • withdraw

        public static boolean withdraw​(int id)
        Withdraws an item for the id and amount given.
        Parameters:
        id - The id of the item to withdraw.
        Returns:
        True if interaction was successful, else False
      • withdrawAll

        public static boolean withdrawAll​(int id)
        Withdraws all of a item for the id and amount given.
        Parameters:
        id - The id of the item to withdraw.
        Returns:
        True if interaction was successful, else False
      • withdraw

        public static boolean withdraw​(int id,
                                       int amount)
        Withdraws an item for the id and amount given.
        Parameters:
        id - The id of the item to withdraw.
        amount - The amount to withdraw.
        Returns:
        True if interaction was successful, else False
      • withdraw

        public static boolean withdraw​(java.lang.String name)
        Withdraws an item for the id and amount given.
        Parameters:
        name - The name of the item to withdraw.
        Returns:
        True if interaction was successful, else False
      • withdraw

        public static boolean withdraw​(java.lang.String name,
                                       int amount)
        Withdraws an item for the id and amount given.
        Parameters:
        name - The name of the item to withdraw.
        amount - The amount to withdraw.
        Returns:
        True if interaction was successful, else False
      • withdrawAll

        public static boolean withdrawAll​(java.lang.String name)
        Withdraws all of a item for the name and amount given.
        Parameters:
        name - The name of the item to withdraw.
        Returns:
        True if interaction was successful, else False
      • withdraw

        public static boolean withdraw​(Filter<Item> filter)
        Withdraws an item for the id and amount given.
        Parameters:
        filter - The item id of the item to withdraw.
        Returns:
        True if interaction was successful, else False
      • withdrawAll

        public static boolean withdrawAll​(Filter<Item> filter)
        Withdraws all items for the id given.
        Parameters:
        filter - The item id of the item to withdraw.
        Returns:
        True if interaction was successful, else False
      • withdraw

        public static boolean withdraw​(Filter<Item> filter,
                                       int amount)
        Withdraws an item for the id and amount given.
        Parameters:
        filter - The item id of the item to withdraw.
        amount - The amount to withdraw.
        Returns:
        True if interaction was successful, else False
      • depositAllItems

        public static boolean depositAllItems()
        Deposits all items in your inventory with the deposit all button.
      • depositAllEquipment

        public static boolean depositAllEquipment()
        Deposits all worn equipment with the deposit all equipment button.
      • deposit

        public static boolean deposit​(Filter<Item> filter,
                                      int amount)
        Deposits the item specified by the item id and amount.
        Parameters:
        filter - The item id of the item to withdraw.
        amount - The amount of the item to deposit.
        Returns:
        True if deposit success, else False
      • depositAllExcept

        public static boolean depositAllExcept​(Filter<Item> filter)
      • close

        public static boolean close()
        Exits the bank with the close button.
        Returns:
        True if bank is not open, else False
      • getCurrentTab

        public static int getCurrentTab()
        Gets the current tab that is open
        Returns:
        Integer value of the current tab, -1 if one isn't open or found
      • slotBounds

        public static java.awt.Rectangle slotBounds​(int slot)
        Gets the bounds of a slot
        Parameters:
        slot - Slot to get bounds of
        Returns:
        Rectangle of the slot
      • slotBounds

        public static java.awt.Rectangle slotBounds​(Item item)
        Gets the bounds of a slot
        Parameters:
        item - Item to get bounds of
        Returns:
        Rectangle of the slot
      • openTab

        public static boolean openTab​(int tab)
        Opens the bank tab specified
        Parameters:
        tab - integer value of tab that you want opened
        Returns:
        whether tab was successfully opened.
      • openTab

        public static boolean openTab​(BankTab tab)
        Opens the BankTab specified.
        Parameters:
        tab - The BankTab to open.
        Returns:
        True if BankTab was opened, else false
      • getBankHistoryCache

        public static java.util.List<Item> getBankHistoryCache()
        Gets the bank item history cache.
        Returns:
        list of all your bank items since your last visit.
      • addToBankHistoryCache

        public static boolean addToBankHistoryCache​(Item item)
        This allows you to add an item to the bank history cache, it should only be necessary if you're doing things outside of our API
        Parameters:
        item - the item to add to the cache
        Returns:
        true if a cache exists and we add the item to it, false otherwise
      • getLastBankHistoryCacheTime

        public static long getLastBankHistoryCacheTime()
        Returns the last timestamp (using System#currentTimeMillis) of a cache update
        Returns:
        timestamp of last cache update, or 0 if the bank cache hasn't been created yet
      • getChild

        public static WidgetChild getChild​(int id)
        Gets the WidgetChild of the Item
        Parameters:
        id - the id of the item
        Returns:
        WidgetChild of the item
      • getChild

        public static WidgetChild getChild​(java.lang.String name)
        Gets the WidgetChild of the Item
        Parameters:
        name - the name of the item
        Returns:
        WidgetChild of the item
      • getChild

        public static WidgetChild getChild​(Filter<Item> filter)
        Gets the WidgetChild of the Item
        Parameters:
        filter - the filter used to find item.
        Returns:
        WidgetChild of the item
      • getChild

        public static WidgetChild getChild​(Item item)
        Gets the WidgetChild of the Item
        Parameters:
        item - Item to get the child of
        Returns:
        WidgetChild of the item
      • getRearrangeMode

        public static BankMode getRearrangeMode()
        Gets the current rearrange mode type;
        Returns:
        current rearrange mode wrapped in a @link:"org.dreambot.api.methods.container.impl.bank.BankMode" object.
      • isSlotVisible

        public static boolean isSlotVisible​(Item item)
        Determines whether or not offset specific slot is visible, defined by the item.
        Parameters:
        item - The item that the slot you are searching for contains.
        Returns:
        Whether or not the specified slot is visible.
      • getWithdrawMode

        public static BankMode getWithdrawMode()
        Gets the current withdraw mode.
        Returns:
        current withdraw mode.
      • setWithdrawMode

        public static boolean setWithdrawMode​(BankMode mode)
        Sets the withdraw mode
        Parameters:
        mode - BankMode
        Returns:
        True if successfully switched, else false
      • setRearrangeMode

        public static boolean setRearrangeMode​(BankMode mode)
        Sets the Rearrange mode for the bank.
        Parameters:
        mode - BankMode
        Returns:
        true if successfully switched else false
      • placeHoldersEnabled

        public static boolean placeHoldersEnabled()
      • togglePlaceholders

        public static boolean togglePlaceholders​(boolean enabled)
      • needToScrollUp

        public static boolean needToScrollUp​(Item item)
        Determines whether or not the bot should scroll up to find the slot given.
        Parameters:
        item - The item that the slot you are searching for contains.
        Returns:
        Whether or not the bot should scroll up to find the slot.
      • needToScrollDown

        public static boolean needToScrollDown​(Item item)
        Determines whether or not the bot should scroll down to find the slot given.
        Parameters:
        item - The item that the slot you are searching for contains.
        Returns:
        Whether or not the bot should scroll down to find the slot.
      • needToScroll

        public static boolean needToScroll​(Item item)
        Determines if the bot needs to scroll to find offset slot.
        Parameters:
        item - The item that the slot you are searching for contains.
        Returns:
        Whether or not the bot needs to scroll to find the slot.
      • getRow

        public static int getRow​(Item item)
        Gets the row of the Item
        Parameters:
        item - Item to find the row of
        Returns:
        Integer value of the row of the Item
      • getTab

        public static int getTab​(Item item)
        Gets the tab for the item
        Parameters:
        item - Item to get the tab of
        Returns:
        Tab of the item
      • availableTabs

        public static int availableTabs()
        Gets the number of tabs currently available
        Returns:
        Integer value of the current amount of tabs available
      • count

        public static int count​(BankTab tab)
        Gets the Item count for the BankTab
        Returns:
        Integer value with how many items are in the tab
      • getCurrentBankTab

        public static BankTab getCurrentBankTab()
        Gets the current BankTab
        Returns:
        currently open BankTab, else null
      • getScrollHeight

        public static int getScrollHeight()
        Determines the current scroll position height of the bank's scroll container.
        Returns:
        The current scroll position height of the bank's scroll container.
      • scroll

        public static boolean scroll​(int id,
                                     BankScroll type)
        Scrolls to the item which matches the given filter.
        Parameters:
        id - the id of the item to scroll to.
        type - the method of scrolling you would like to use.
        Returns:
        true if the item is visible after scrolling.
      • scroll

        public static boolean scroll​(int id)
        Scrolls to the item which matches the given filter.
        Parameters:
        id - the id of the item to scroll to.
        Returns:
        true if the item is visible after scrolling.
      • scroll

        public static boolean scroll​(java.lang.String name,
                                     BankScroll type)
        Scrolls to the item which matches the given filter.
        Parameters:
        name - the name of the item to scroll to.
        type - the method of scrolling you would like to use.
        Returns:
        true if the item is visible after scrolling.
      • scroll

        public static boolean scroll​(java.lang.String name)
        Scrolls to the item which matches the given filter.
        Parameters:
        name - the name of the item to scroll to.
        Returns:
        true if the item is visible after scrolling.
      • scroll

        public static boolean scroll​(Filter<Item> filter)
        Scrolls to the item which matches the given filter.
        Parameters:
        filter - the filter of the item to scroll to.
        Returns:
        true if the item is visible after scrolling.
      • scroll

        public static boolean scroll​(Filter<Item> filter,
                                     BankScroll type)
        Scrolls to the item which matches the given filter.
        Parameters:
        filter - the filter of the item to scroll to.
        type - the method of scrolling you would like to use.
        Returns:
        true if the item is visible after scrolling.
      • depositAll

        public static boolean depositAll​(Filter<Item> filter)
      • deposit

        public static boolean deposit​(int id,
                                      int amount)
      • deposit

        public static boolean deposit​(java.lang.String name,
                                      int amount)
      • deposit

        public static boolean deposit​(Item item,
                                      int amount)
      • depositAllExcept

        public static boolean depositAllExcept​(java.lang.String... names)
      • depositAllExcept

        public static boolean depositAllExcept​(java.lang.Integer... ids)
      • deposit

        public static boolean deposit​(int id)
      • deposit

        public static boolean deposit​(java.lang.String name)
      • deposit

        public static boolean deposit​(Item item)
      • deposit

        public static boolean deposit​(Filter<Item> filter)
      • depositAll

        public static boolean depositAll​(int id)
      • depositAll

        public static boolean depositAll​(java.lang.String name)
      • depositAll

        public static boolean depositAll​(Item item)
      • fullSlotCount

        public static int fullSlotCount()
        Full slot count.
        Returns:
        the count of full slots as a int.
      • emptySlotCount

        public static int emptySlotCount()
        Empty slot count.
        Returns:
        the count of empty slots as a int.
      • isSlotEmpty

        public static boolean isSlotEmpty​(int slot)
      • isSlotFull

        public static boolean isSlotFull​(int slot)
        Checks if the slot has an Item in it
        Parameters:
        slot - slot to check
        Returns:
        True if there's an item there, else False
      • onlyContains

        public static boolean onlyContains​(java.lang.String... names)
        Checks if your Bank only contains items with specified name
        Parameters:
        names - Names of items to look for
        Returns:
        True if Bank only contains items with that name, else False
      • onlyContains

        public static boolean onlyContains​(java.lang.Integer... id)
        Checks if your Bank only contains items with specified ID
        Parameters:
        id - IDs of items to check for
        Returns:
        True if Bank only contains items with specified ID, else False
      • onlyContains

        public static boolean onlyContains​(Filter<Item> f)
        Checks if your Bank only contains items that match the Filter
        Parameters:
        f - Filter to pass items through
        Returns:
        True if Bank only contains items matching Filter, else False
      • slotContains

        public static boolean slotContains​(int slot,
                                           java.lang.String... names)
        Checks if the slot contains items that matches the given names.
        Parameters:
        names - names of the items to check
        Returns:
        true if Bank only contains items matching Filter, else false
      • slotNameContains

        public static boolean slotNameContains​(int slot,
                                               java.lang.String sub)
        Checks if the slot contains items that matches the given ids.
        Parameters:
        sub - the substring which will be used to search.
        Returns:
        True if Bank only contains items matching Filter, else false.
      • slotContains

        public static boolean slotContains​(int slot,
                                           java.lang.Integer... ids)
        Checks if the slot contains items that matches the given ids.
        Parameters:
        ids - ids of the items to check.
        Returns:
        True if Bank only contains items matching Filter, else false.
      • slotContains

        public static boolean slotContains​(int slot,
                                           Item t)
        Checks if the slot contains items that matches the given ids.
        Parameters:
        t - The object to check.
        Returns:
        True if Bank only contains items matching Filter, else false.
      • slotContains

        public static boolean slotContains​(int slot,
                                           Filter<Item> filter)
        Checks if the slot contains items that matches the filter.
        Parameters:
        filter - Filter to pass items through.
        Returns:
        True if Bank only contains items matching Filter, else false.
      • getFirstEmptySlot

        public static int getFirstEmptySlot()
        Gets the first empty slot in your inventory.
        Returns:
        slot number, if inventory is full -1.
      • getFirstFullSlot

        public static int getFirstFullSlot()
        Gets the next full slot in your inventory
        Returns:
        slot number, if inventory is empty -1
      • getIdForSlot

        public static int getIdForSlot​(int slot)
        Gets the Id of the Item in the slot.
        Parameters:
        slot - Slot to get item id of.
        Returns:
        Item ID or -1 if no item.
      • getNameForSlot

        public static java.lang.String getNameForSlot​(int slot)
        Gets the Name for the Item in the slot.
        Parameters:
        slot - Slot to get item name of.
        Returns:
        Item name or "" if item is null.
      • slot

        public static int slot​(int id)
        Gets the slot for the item with specified ID.
        Parameters:
        id - ID of item to get slot of.
        Returns:
        Item slot or -1 if Item is null.
      • slot

        public static int slot​(java.lang.String name)
        Gets the slot for the item with specified name.
        Parameters:
        name - Name of item to get slot of.
        Returns:
        Item slot or -1 if Item is null.
      • slot

        public static int slot​(Filter<Item> filter)
        Gets the slot for the item with specified name.
        Parameters:
        filter - filter of of item to get slot of.
        Returns:
        Item slot or -1 if Item is null.
      • add

        public static boolean add​(Item t)
      • toArray

        public static java.lang.Object[] toArray()
      • add

        public static void add​(int index,
                               Item t)
      • all

        public static java.util.List<Item> all​(Filter<Item> filter)
        A list of all the items.
        Parameters:
        filter - the filter to search with.
        Returns:
        the list of all filtered items.
      • getItemInSlot

        public static Item getItemInSlot​(int index)
        Gets item in specified slot.
        Parameters:
        index - the index.
        Returns:
        the item in slot.
      • get

        public static Item get​(int id)
      • get

        public static Item get​(java.lang.Integer... ids)
      • get

        public static Item get​(java.lang.String name)
        Get item for specified name.
        Parameters:
        name - the name of the item.
        Returns:
        the item if list contains it, otherwise null.
      • get

        public static Item get​(java.lang.String... names)
      • except

        public static java.util.List<Item> except​(Filter<Item> filter)
        Get all items which do not fit the given criteria.
        Parameters:
        filter - The filter of the items to ignore.
        Returns:
        The list of items found which do not match the given criteria.
      • size

        public static int size()
      • isEmpty

        public static boolean isEmpty()
      • contains

        public static boolean contains​(int id)
        Contains boolean.
        Parameters:
        id - the id
        Returns:
        the boolean
      • contains

        public static boolean contains​(java.lang.String string)
        Determines if collection contains item with specified name.
        Parameters:
        string - the name of the item.
        Returns:
        true if collection contains item, otherwise false.
      • containsAll

        public static boolean containsAll​(java.lang.String... names)
        Checks if your Bank contains all of the items with names specified
        Parameters:
        names - Names of items to check for
        Returns:
        True if Bank contains all names, else False
      • containsAll

        public static boolean containsAll​(int... ids)
        Checks if your Bank contains all of the items with specified IDs
        Parameters:
        ids - IDs of items to check for
        Returns:
        True if Bank contains all IDs, else false.
      • containsAll

        public static boolean containsAll​(java.util.Collection<?> collection)
        Checks if your collection contains all of the items in the collections
        Parameters:
        collection - The collection of items to compare against
        Returns:
        True if inventory contains all of the items, else false.
      • contains

        public static boolean contains​(java.lang.Integer... ids)
        Checks if your collection contains one item which meets one of the specified ids.
        Parameters:
        ids - Item IDs to check for
        Returns:
        True if contains one of, else false
      • contains

        public static boolean contains​(java.lang.String... names)
        Checks if your collection contains one item which meets one of the specified names.
        Parameters:
        names - names to check for
        Returns:
        true if contains one of, else false.
      • contains

        public static boolean contains​(Filter<Item> filter)
        Checks if your collection contains one item which meets the specified filter. Will return false if it's just a placeholder.
        Parameters:
        filter - the filter to search with.
        Returns:
        true if contains one of, else false.
      • contains

        public static boolean contains​(java.lang.Object o)
      • isFull

        public static boolean isFull()
        Determines if container full.
        Returns:
        the boolean
      • count

        public static int count​(java.lang.String name)
        Count of all the items that match the search.
        Parameters:
        name - the name of the item.
        Returns:
        the total count of matching items.
      • count

        public static int count​(int id)
        Count of all the items that match the search.
        Parameters:
        id - the id of them item.
        Returns:
        the total count of matching items.
      • count

        public static int count​(Filter<Item> filter)
        Count of all the items that match the search.
        Parameters:
        filter - the filter to count with
        Returns:
        the total count of matching items.
      • set

        public static Item set​(int index,
                               Item element)