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
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultItemEntry(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()intintgetSetup()interchange(String... names) booleanisNoted()booleanbooleanvoidsetSetup(ItemEntrySetup setup) Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:
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:
-
clone
-
interchange
- Specified by:
interchangein interfaceItemEntry
-
clone
-
isStackable
public boolean isStackable()- Specified by:
isStackablein interfaceItemEntry- Returns:
trueif this item is stackable
-
isNoted
-
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
- Specified by:
getEquipmentSlotin interfaceItemEntry- Returns:
- An
Equipment.Slotif applicable, null otherwise
-
getSetup
- Specified by:
getSetupin interfaceItemEntry- Returns:
- The
ItemEntrySetupassociated with this entry, or null if no setup is required
-
setSetup
-