Class Item
Object
Item
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a new item to this bag.getAttribute(String name) getId()getName()booleanisAttribute(String name) booleanremoveAttribute(String name) voidremoveItem(Item item) Actually destroys an item from this container.voidsetAttribute(String name, String value)
-
Constructor Details
-
Item
-
-
Method Details
-
getId
-
getItemdef
-
getName
-
getDescription
-
getAttribute
-
setAttribute
-
isAttribute
-
removeAttribute
-
addItem
Adds a new item to this bag. With new it is understood that the item was created with a call toItems.createItem(int), and is not yet allocated to a room, person or container.- Parameters:
item- the new item to add.- Returns:
- the exact same item, or null if unable to comply.
-
removeItem
Actually destroys an item from this container.- Parameters:
item- the new item to destroy.
-