Package com.kraken.api.query.container
Class ContainerItem
- java.lang.Object
-
- com.kraken.api.query.container.ContainerItem
-
public class ContainerItem extends java.lang.ObjectRepresents an item stored in an item container (either the inventory or Bank).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classContainerItem.ItemOrigin
-
Constructor Summary
Constructors Constructor Description ContainerItem(net.runelite.api.Item item, net.runelite.api.ItemComposition itemComposition, int slot, Context context, net.runelite.api.widgets.Widget widget, ContainerItem.ItemOrigin origin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.awt.RectanglegetBounds(Context context, net.runelite.api.Client client)Returns the rectangle bounds of an inventory itemjava.util.List<java.lang.String>getEquipmentActions()Gets the equipment actions, loading composition if needed.intgetHaPrice()The high alchemy price for the itemjava.lang.String[]getInventoryActions()Gets the inventory actions, loading composition if needed.net.runelite.api.ItemCompositiongetItemComposition()Gets the item composition, loading it if needed.java.lang.StringgetName()Gets the item name, loading composition if needed.inthashCode()booleanisFood()True if the item is food.booleanisNoted()Gets whether the item is noted, loading composition if needed.booleanisStackable()Gets whether the item is stackable, loading composition if needed.booleanisTradeable()Gets whether the item is tradeable, loading composition if needed.java.lang.StringtoString()
-
-
-
Constructor Detail
-
ContainerItem
public ContainerItem(net.runelite.api.Item item, net.runelite.api.ItemComposition itemComposition, int slot, Context context, net.runelite.api.widgets.Widget widget, ContainerItem.ItemOrigin origin)
-
-
Method Detail
-
getBounds
public java.awt.Rectangle getBounds(Context context, net.runelite.api.Client client)
Returns the rectangle bounds of an inventory item- Parameters:
context- API Contextclient- RuneLite client instance- Returns:
- Rectangle bounds for the bank item.
-
getName
public java.lang.String getName()
Gets the item name, loading composition if needed.- Returns:
- String the name of the inventory item
-
isStackable
public boolean isStackable()
Gets whether the item is stackable, loading composition if needed.- Returns:
- boolean true if the item is stackable and false otherwise
-
isNoted
public boolean isNoted()
Gets whether the item is noted, loading composition if needed.- Returns:
- true if the item is noted and false otherwise.
-
isTradeable
public boolean isTradeable()
Gets whether the item is tradeable, loading composition if needed.- Returns:
- True if the item is tradeable and false otherwise
-
getInventoryActions
public java.lang.String[] getInventoryActions()
Gets the inventory actions, loading composition if needed.- Returns:
- The inventory actions for an item. i.e "Wield", "Examine", "Drop", "Use"
-
getEquipmentActions
public java.util.List<java.lang.String> getEquipmentActions()
Gets the equipment actions, loading composition if needed. This returns a list of actions that can be performed on the item when equipped.- Returns:
- The list of actions on the equipment
-
getItemComposition
public net.runelite.api.ItemComposition getItemComposition()
Gets the item composition, loading it if needed.- Returns:
- The items composition object
-
isFood
public boolean isFood()
True if the item is food. This returns jugs of wine as food and will not return rock cakes as food.- Returns:
- True if the item is food and false otherwise.
-
getHaPrice
public int getHaPrice()
The high alchemy price for the item- Returns:
- The amount of GP received when this item is high alched for gold.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-