Interface ItemEntry
- All Superinterfaces:
Cloneable, Serializable
- All Known Subinterfaces:
FuzzyItemEntry, IdItemEntry, InterchangeableItemEntry
- All Known Implementing Classes:
DefaultFuzzyItemEntry, DefaultIdItemEntry, DefaultInterchangeableItemEntry, DefaultItemEntry
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionclone()default ItemEntryclone(RestockMeta restockMeta) default booleandefault booleandefault booleandefault booleandefault ItemQueryResultsgetContained(Inventory inv) default ItemQueryResultsgetContained(ItemQuery query) default Equipment.SlotgetKey()default intintdefault RestockMetadefault ItemEntrySetupgetSetup()interchange(String... names) static booleanisNoteableContext(Item item) default booleanisNoted()default booleandefault booleandefault voidsetSetup(ItemEntrySetup setup)
-
Field Details
-
ALL
-
-
Method Details
-
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:
-
getMinimumQuantity
default int getMinimumQuantity()- Returns:
- The minimum quantity allowed in this loadout for validation to pass
-
clone
ItemEntry clone() -
interchange
-
clone
-
isStackable
default boolean isStackable()- Returns:
trueif this item is stackable
-
isNoted
default boolean isNoted() -
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
- Returns:
- An
Equipment.Slotif applicable, null otherwise
-
getSetup
- Returns:
- The
ItemEntrySetupassociated with this entry, or null if no setup is required
-
setSetup
- Parameters:
setup- Adds a required setup for this entry
-
isNoteableContext
-
getContained
- Returns:
- An
ItemQueryResultsmatchinggetKey(). - See Also:
-
getContained
-
contained
-
contained
-
contained
-
contained
- Returns:
trueif this ItemEntry is contained in the given inventory
-