java.lang.ObjectItem
public class Item
Represents an item which can be used by a player
Constructor Summary | |
---|---|
Item(java.lang.String description)
Constructor for objects of type Item |
Method Summary | |
---|---|
java.lang.String |
getDescription()
Returns the description of the item |
void |
setDescription(java.lang.String description)
Sets the value of description |
java.lang.String |
toString()
Returns a String representation of this object |
void |
use()
Use the item |
Methods inherited from class |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Item(java.lang.String description)
description
- value for the descriptionMethod Detail |
---|
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- the new value of descriptionpublic java.lang.String toString()
toString
in class java.lang.Object
public void use()