Class DefaultItemEntry

java.lang.Object
org.rspeer.game.config.item.entry.impl.DefaultItemEntry
All Implemented Interfaces:
Serializable, Cloneable, ItemEntry
Direct Known Subclasses:
DefaultFuzzyItemEntry

public class DefaultItemEntry extends Object implements ItemEntry
See Also:
  • Constructor Details

    • DefaultItemEntry

      public DefaultItemEntry()
    • DefaultItemEntry

      public DefaultItemEntry(String key, int minimumQuantity, int quantity, boolean stackable, boolean noted, RestockMeta restockMeta, boolean optional, Equipment.Slot equipmentSlot)
  • Method Details

    • getKey

      public String getKey()
      Specified by:
      getKey in interface ItemEntry
      Returns:
      A key used as an identifier/debug info for the item. Should generally be the item name, unless it's fuzzy
    • getMinimumQuantity

      public int getMinimumQuantity()
      Specified by:
      getMinimumQuantity in interface ItemEntry
      Returns:
      The minimum quantity allowed in this loadout for validation to pass
    • getQuantity

      public int getQuantity()
      Specified by:
      getQuantity in interface ItemEntry
      Returns:
      The quantity of the item to take. If the quantity is defined as ItemEntry.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:
    • clone

      public ItemEntry clone()
      Specified by:
      clone in interface ItemEntry
    • clone

      public ItemEntry clone(RestockMeta restockMeta)
      Specified by:
      clone in interface ItemEntry
    • isStackable

      public boolean isStackable()
      Specified by:
      isStackable in interface ItemEntry
      Returns:
      true if this item is stackable
    • isNoted

      public boolean isNoted()
      Specified by:
      isNoted in interface ItemEntry
    • getRestockMeta

      public RestockMeta getRestockMeta()
      Specified by:
      getRestockMeta in interface ItemEntry
      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

      public boolean isOptional()
      Specified by:
      isOptional in interface ItemEntry
      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

      public Equipment.Slot getEquipmentSlot()
      Specified by:
      getEquipmentSlot in interface ItemEntry
      Returns:
      An Equipment.Slot if applicable, null otherwise
    • getSetup

      public ItemEntrySetup getSetup()
      Specified by:
      getSetup in interface ItemEntry
      Returns:
      The ItemEntrySetup associated with this entry, or null if no setup is required
    • setSetup

      public void setSetup(ItemEntrySetup setup)
      Specified by:
      setSetup in interface ItemEntry
      Parameters:
      setup - Adds a required setup for this entry