Class DefaultItemEntry
- java.lang.Object
-
- org.rspeer.game.config.item.entry.impl.DefaultItemEntry
-
- All Implemented Interfaces:
Serializable,Cloneable,ItemEntry
- Direct Known Subclasses:
DefaultFuzzyItemEntry,DefaultIdItemEntry,DefaultInterchangeableItemEntry
public class DefaultItemEntry extends Object implements ItemEntry
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultItemEntry()DefaultItemEntry(String key, int minimumQuantity, int quantity, boolean stackable, boolean noted, RestockMeta restockMeta, boolean optional, Equipment.Slot equipmentSlot)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemEntryclone()ItemEntryclone(RestockMeta restockMeta)Equipment.SlotgetEquipmentSlot()StringgetKey()intgetMinimumQuantity()intgetQuantity()RestockMetagetRestockMeta()ItemEntrySetupgetSetup()InterchangeableItemEntryinterchange(String... names)booleanisNoted()booleanisOptional()booleanisStackable()voidsetSetup(ItemEntrySetup setup)-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.rspeer.game.config.item.entry.ItemEntry
contained, contained, contained, contained, getContained, getContained
-
-
-
-
Constructor Detail
-
DefaultItemEntry
public DefaultItemEntry()
-
DefaultItemEntry
public DefaultItemEntry(String key, int minimumQuantity, int quantity, boolean stackable, boolean noted, RestockMeta restockMeta, boolean optional, Equipment.Slot equipmentSlot)
-
-
Method Detail
-
getKey
public String getKey()
-
getMinimumQuantity
public int getMinimumQuantity()
- Specified by:
getMinimumQuantityin interfaceItemEntry- Returns:
- The minimum quantity allowed in this loadout for validation to pass
-
getQuantity
public int getQuantity()
- Specified by:
getQuantityin interfaceItemEntry- Returns:
- The quantity of the item to take.
If the quantity is defined as
ItemEntry.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:
ItemEntry.isStackable()
-
interchange
public InterchangeableItemEntry interchange(String... names)
- Specified by:
interchangein interfaceItemEntry
-
clone
public ItemEntry clone(RestockMeta restockMeta)
-
isStackable
public boolean isStackable()
- Specified by:
isStackablein interfaceItemEntry- Returns:
trueif this item is stackable
-
getRestockMeta
public RestockMeta getRestockMeta()
- Specified by:
getRestockMetain interfaceItemEntry- Returns:
- A
RestockMetaobject detailing the restocking specifications of this item, ornullif the item is not restockable, or doesn't need to be restocked
-
isOptional
public boolean isOptional()
- Specified by:
isOptionalin interfaceItemEntry- 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:
getEquipmentSlotin interfaceItemEntry- Returns:
- An
Equipment.Slotif applicable, null otherwise
-
getSetup
public ItemEntrySetup getSetup()
- Specified by:
getSetupin interfaceItemEntry- Returns:
- The
ItemEntrySetupassociated with this entry, or null if no setup is required
-
setSetup
public void setSetup(ItemEntrySetup setup)
-
-