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:
- 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 ItemEntry
clone()
ItemEntry
clone(RestockMeta restockMeta)
Equipment.Slot
getEquipmentSlot()
String
getKey()
int
getMinimumQuantity()
int
getQuantity()
RestockMeta
getRestockMeta()
ItemEntrySetup
getSetup()
boolean
isNoted()
boolean
isOptional()
boolean
isStackable()
void
setSetup(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:
getMinimumQuantity
in interfaceItemEntry
- Returns:
- The minimum quantity allowed in this loadout for validation to pass
-
getQuantity
public int getQuantity()
- Specified by:
getQuantity
in interfaceItemEntry
- 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:
ItemEntry.isStackable()
-
clone
public ItemEntry clone(RestockMeta restockMeta)
-
isStackable
public boolean isStackable()
- Specified by:
isStackable
in interfaceItemEntry
- Returns:
true
if this item is stackable
-
getRestockMeta
public RestockMeta getRestockMeta()
- Specified by:
getRestockMeta
in interfaceItemEntry
- 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
public boolean isOptional()
- Specified by:
isOptional
in 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:
getEquipmentSlot
in interfaceItemEntry
- Returns:
- An
Equipment.Slot
if applicable, null otherwise
-
getSetup
public ItemEntrySetup getSetup()
- Specified by:
getSetup
in interfaceItemEntry
- Returns:
- The
ItemEntrySetup
associated with this entry, or null if no setup is required
-
setSetup
public void setSetup(ItemEntrySetup setup)
-
-