Interface InventoryLoadout
-
- All Known Implementing Classes:
BackpackLoadout
,EquipmentLoadout
public interface InventoryLoadout extends Iterable<ItemEntry>, Cloneable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description boolean
add(ItemEntry entry)
Adds anItemEntry
to the loadoutdefault void
applyProvidedSetup(ItemEntry entry)
Applies a predefined setup if there is one available for the givenItemEntry
's keyInventoryLoadout
clone()
InventoryLoadout
clone(String name)
ItemEntry
get(String key)
default List<ItemEntry>
getExcessBackpackEntries()
default List<ItemEntry>
getExcessEntries(Inventory inventory)
default List<ItemEntry>
getExcessEquipmentEntries()
default List<ItemEntry>
getExcessItems()
Deprecated, for removal: This API element is subject to removal in a future version.default List<Item>
getInvalidBackpackItems()
default List<Item>
getInvalidEquipmentItems()
default List<Item>
getInvalidItems(Inventory inventory)
default List<Item>
getIrrelevantItems()
Deprecated, for removal: This API element is subject to removal in a future version.default List<ItemEntry>
getMissing()
Deprecated, for removal: This API element is subject to removal in a future version.default List<ItemEntry>
getMissingBackpackEntries()
default List<ItemEntry>
getMissingBackpackEntries(boolean strict)
default List<ItemEntry>
getMissingEntries()
default List<ItemEntry>
getMissingEntries(boolean strict)
default List<ItemEntry>
getMissingEntries(Inventory inventory)
default List<ItemEntry>
getMissingEntries(Inventory inventory, boolean strict)
default List<ItemEntry>
getMissingEquipmentEntries()
default List<ItemEntry>
getMissingEquipmentEntries(boolean strict)
String
getName()
Consumer<ItemEntry>
getOutOfItemListener()
default ItemQueryResults
getValidBackpackResults()
default ItemQueryResults
getValidEquipmentResults()
default ItemQueryResults
getValidResults(Inventory inventory)
default boolean
isBackpackValid()
default boolean
isBackpackValid(boolean strict)
default boolean
isBagged()
Deprecated, for removal: This API element is subject to removal in a future version.default boolean
isBagged(boolean strict)
Deprecated, for removal: This API element is subject to removal in a future version.default boolean
isEquipmentValid()
default boolean
isEquipmentValid(boolean strict)
default boolean
isInventoryValid(Inventory inventory)
default boolean
isInventoryValid(Inventory inventory, boolean strict)
ItemEntry
remove(String key)
void
setOutOfItemListener(Consumer<ItemEntry> outOfItemListener)
boolean
withdraw()
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Method Detail
-
getName
String getName()
- Returns:
- The name of this loadout
-
add
boolean add(ItemEntry entry)
Adds anItemEntry
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
-
clone
InventoryLoadout clone(String name)
-
clone
InventoryLoadout clone()
-
applyProvidedSetup
default void applyProvidedSetup(ItemEntry entry)
Applies a predefined setup if there is one available for the givenItemEntry
's key
-
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
-
getMissing
@Deprecated(forRemoval=true) default List<ItemEntry> getMissing()
Deprecated, for removal: This API element is subject to removal in a future version.UsegetExcessBackpackEntries()
instead.
-
getExcessItems
@Deprecated(forRemoval=true) default List<ItemEntry> getExcessItems()
Deprecated, for removal: This API element is subject to removal in a future version.UsegetExcessBackpackEntries()
instead.
-
getIrrelevantItems
@Deprecated(forRemoval=true) default List<Item> getIrrelevantItems()
Deprecated, for removal: This API element is subject to removal in a future version.UsegetInvalidBackpackItems()
instead.
-
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.UseisBackpackValid(boolean)
instead.- Parameters:
strict
-true
to useItemEntry.getQuantity()
for matching quantities,false
to useItemEntry.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.UseisBackpackValid()
instead.
-
withdraw
boolean withdraw()
-
-