Interface ItemEntry
-
- All Superinterfaces:
Cloneable,Serializable
- All Known Subinterfaces:
FuzzyItemEntry,IdItemEntry,InterchangeableItemEntry
- All Known Implementing Classes:
DefaultFuzzyItemEntry,DefaultIdItemEntry,DefaultInterchangeableItemEntry,DefaultItemEntry
public interface ItemEntry extends Cloneable, Serializable
-
-
Field Summary
Fields Modifier and Type Field Description static intALLDeprecated.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ItemEntryclone()default ItemEntryclone(RestockMeta restockMeta)default booleancontained(Inventory inv)default booleancontained(Inventory inv, boolean strict)default booleancontained(ItemQuery query)default booleancontained(ItemQuery query, boolean strict)default ItemQueryResultsgetContained(Inventory inv)default ItemQueryResultsgetContained(ItemQuery query)default Equipment.SlotgetEquipmentSlot()StringgetKey()default intgetMinimumQuantity()intgetQuantity()default RestockMetagetRestockMeta()default ItemEntrySetupgetSetup()InterchangeableItemEntryinterchange(String... names)static booleanisNoteableContext(Item item)default booleanisNoted()default booleanisOptional()default booleanisStackable()default voidsetSetup(ItemEntrySetup setup)
-
-
-
Field Detail
-
ALL
@Deprecated static final int ALL
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
getKey
String getKey()
- Returns:
- A key used as an identifier/debug info for the item. Should generally be the item name, unless it's fuzzy
-
getQuantity
int getQuantity()
- Returns:
- The quantity of the item to take.
If the quantity is defined as
ALLand the item is stackable, then in the context of banking, it indicates that the withdraw-all option should be used and the amount not be validated - See Also:
isStackable()
-
getMinimumQuantity
default int getMinimumQuantity()
- Returns:
- The minimum quantity allowed in this loadout for validation to pass
-
clone
ItemEntry clone()
-
interchange
InterchangeableItemEntry interchange(String... names)
-
clone
default ItemEntry clone(RestockMeta restockMeta)
-
isStackable
default boolean isStackable()
- Returns:
trueif this item is stackable
-
isNoted
default boolean isNoted()
-
getRestockMeta
default RestockMeta getRestockMeta()
- Returns:
- A
RestockMetaobject detailing the restocking specifications of this item, ornullif the item is not restockable, or doesn't need to be restocked
-
isOptional
default boolean isOptional()
- Returns:
- Whether this item is optional in the loadout or not. If it is marked as optional, any validation/contains/equals checks will ignore it
-
getEquipmentSlot
default Equipment.Slot getEquipmentSlot()
- Returns:
- An
Equipment.Slotif applicable, null otherwise
-
getSetup
default ItemEntrySetup getSetup()
- Returns:
- The
ItemEntrySetupassociated with this entry, or null if no setup is required
-
setSetup
default void setSetup(ItemEntrySetup setup)
- Parameters:
setup- Adds a required setup for this entry
-
isNoteableContext
static boolean isNoteableContext(Item item)
-
getContained
default ItemQueryResults getContained(Inventory inv)
- Returns:
- An
ItemQueryResultsmatchinggetKey(). - See Also:
contained(Inventory)
-
getContained
default ItemQueryResults getContained(ItemQuery query)
-
contained
default boolean contained(Inventory inv)
-
contained
default boolean contained(Inventory inv, boolean strict)
-
contained
default boolean contained(ItemQuery query)
-
contained
default boolean contained(ItemQuery query, boolean strict)
- Returns:
trueif this ItemEntry is contained in the given inventory
-
-