Class DefaultItemEntry
java.lang.Object
org.rspeer.game.config.item.entry.impl.DefaultItemEntry
- All Implemented Interfaces:
Serializable
,Cloneable
,ItemEntry
- Direct Known Subclasses:
DefaultFuzzyItemEntry
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDefaultItemEntry
(String key, int minimumQuantity, int quantity, boolean stackable, boolean noted, RestockMeta restockMeta, boolean optional, Equipment.Slot equipmentSlot) -
Method Summary
Modifier and TypeMethodDescriptionclone()
clone
(RestockMeta restockMeta) getKey()
int
int
getSetup()
boolean
isNoted()
boolean
boolean
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 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
-
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:
-
clone
-
clone
-
isStackable
public boolean isStackable()- Specified by:
isStackable
in interfaceItemEntry
- Returns:
true
if this item is stackable
-
isNoted
public boolean isNoted() -
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
- Specified by:
getEquipmentSlot
in interfaceItemEntry
- Returns:
- An
Equipment.Slot
if applicable, null otherwise
-
getSetup
- Specified by:
getSetup
in interfaceItemEntry
- Returns:
- The
ItemEntrySetup
associated with this entry, or null if no setup is required
-
setSetup
-