Interface ItemEntry

All Superinterfaces:
Cloneable, Serializable
All Known Subinterfaces:
FuzzyItemEntry
All Known Implementing Classes:
DefaultFuzzyItemEntry, DefaultItemEntry

public interface ItemEntry extends Cloneable, Serializable
  • Field Details

  • 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 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:
    • 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, or null 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 matching getKey().
      See Also:
    • 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