Interface InventoryLoadout

All Superinterfaces:
Cloneable, Iterable<ItemEntry>
All Known Implementing Classes:
BackpackLoadout, EquipmentLoadout

public interface InventoryLoadout extends Iterable<ItemEntry>, Cloneable
  • Method Details

    • getName

      String getName()
      Returns:
      The name of this loadout
    • get

      ItemEntry get(String key)
      Returns:
      An ItemEntry with the given key
    • add

      boolean add(ItemEntry entry)
      Adds an ItemEntry to the loadout
      Returns:
      true if an item was successfully added to the loadout
    • remove

      ItemEntry remove(String key)
      Returns:
      The removed entry, or null if no ItemEntry matching the key was present
    • getOutOfItemListener

      Consumer<ItemEntry> getOutOfItemListener()
    • setOutOfItemListener

      void setOutOfItemListener(Consumer<ItemEntry> outOfItemListener)
    • clone

      InventoryLoadout clone(String name)
    • clone

    • applyProvidedSetup

      default void applyProvidedSetup(ItemEntry entry)
      Applies a predefined setup if there is one available for the given ItemEntry's key
    • getMissingEntries

      default List<ItemEntry> getMissingEntries(Inventory inventory, boolean strict)
    • getMissingEntries

      default List<ItemEntry> getMissingEntries(Inventory inventory)
    • getMissingEntries

      default List<ItemEntry> getMissingEntries(boolean strict)
      Returns:
      the missing entries for both equipment and backpack
    • getMissingEntries

      default List<ItemEntry> getMissingEntries()
      Returns:
      the missing entries for both equipment and backpack
    • getMissingBackpackEntries

      default List<ItemEntry> getMissingBackpackEntries(boolean strict)
    • getMissingBackpackEntries

      default List<ItemEntry> getMissingBackpackEntries()
    • getMissingEquipmentEntries

      default List<ItemEntry> getMissingEquipmentEntries(boolean strict)
    • getMissingEquipmentEntries

      default List<ItemEntry> getMissingEquipmentEntries()
    • getMissing

      @Deprecated(forRemoval=true) default List<ItemEntry> getMissing()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getExcessEntries

      default List<ItemEntry> getExcessEntries(Inventory inventory)
    • getExcessBackpackEntries

      default List<ItemEntry> getExcessBackpackEntries()
    • getExcessEquipmentEntries

      default List<ItemEntry> getExcessEquipmentEntries()
    • getExcessItems

      @Deprecated(forRemoval=true) default List<ItemEntry> getExcessItems()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getInvalidItems

      default List<Item> getInvalidItems(Inventory inventory)
    • getInvalidBackpackItems

      default List<Item> getInvalidBackpackItems()
    • getInvalidEquipmentItems

      default List<Item> getInvalidEquipmentItems()
    • getIrrelevantItems

      @Deprecated(forRemoval=true) default List<Item> getIrrelevantItems()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getValidResults

      default ItemQueryResults getValidResults(Inventory inventory)
    • getValidBackpackResults

      default ItemQueryResults getValidBackpackResults()
    • getValidEquipmentResults

      default ItemQueryResults getValidEquipmentResults()
    • isInventoryValid

      default boolean isInventoryValid(Inventory inventory, boolean strict)
    • isInventoryValid

      default boolean isInventoryValid(Inventory inventory)
    • isBackpackValid

      default boolean isBackpackValid(boolean strict)
    • isBackpackValid

      default boolean isBackpackValid()
    • isEquipmentValid

      default boolean isEquipmentValid(boolean strict)
    • isEquipmentValid

      default boolean isEquipmentValid()
    • isBagged

      @Deprecated(forRemoval=true) default boolean isBagged(boolean strict)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      strict - true to use ItemEntry.getQuantity() for matching quantities, false to use ItemEntry.getMinimumQuantity()
      Returns:
      true if all the items are in the inventory matching the desired quantities
    • isBagged

      @Deprecated(forRemoval=true) default boolean isBagged()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use isBackpackValid() instead.
    • withdraw

      boolean withdraw()