Interface ItemEntry
-
- All Superinterfaces:
Cloneable
,Serializable
- All Known Subinterfaces:
FuzzyItemEntry
- All Known Implementing Classes:
DefaultFuzzyItemEntry
,DefaultItemEntry
public interface ItemEntry extends Cloneable, Serializable
-
-
Field Summary
Fields Modifier and Type Field Description static int
ALL
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ItemEntry
clone()
default ItemEntry
clone(RestockMeta restockMeta)
default boolean
contained(Inventory inv)
default boolean
contained(Inventory inv, boolean strict)
default boolean
contained(ItemQuery query)
default boolean
contained(ItemQuery query, boolean strict)
default ItemQueryResults
getContained(Inventory inv)
default ItemQueryResults
getContained(ItemQuery query)
default Equipment.Slot
getEquipmentSlot()
String
getKey()
default int
getMinimumQuantity()
int
getQuantity()
default RestockMeta
getRestockMeta()
default ItemEntrySetup
getSetup()
default boolean
isNoted()
default boolean
isOptional()
default boolean
isStackable()
default void
setSetup(ItemEntrySetup setup)
-
-
-
Field Detail
-
ALL
static final int ALL
- 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
ALL
and 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()
-
clone
default ItemEntry clone(RestockMeta restockMeta)
-
isStackable
default boolean isStackable()
- Returns:
true
if this item is stackable
-
isNoted
default boolean isNoted()
-
getRestockMeta
default RestockMeta getRestockMeta()
- Returns:
- A
RestockMeta
object detailing the restocking specifications of this item, ornull
if 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.Slot
if applicable, null otherwise
-
getSetup
default ItemEntrySetup getSetup()
- Returns:
- The
ItemEntrySetup
associated 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
-
getContained
default ItemQueryResults getContained(Inventory inv)
- Returns:
- An
ItemQueryResults
matchinggetKey()
. - 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:
true
if this ItemEntry is contained in the given inventory
-
-