|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectItem
public class Item
Represents an item which can be used by a player
Constructor Summary | |
---|---|
Item(String description)
Constructor for objects of type Item |
Method Summary | |
---|---|
boolean |
equals(Object o)
Returns true if this object and the object under test have the same value in the description property. |
String |
getDescription()
Returns the description of the item |
void |
setDescription(String description)
Sets the value of description |
String |
toString()
Returns a String representation of this object |
void |
use()
Use the item |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Item(String description)
description
- value for the descriptionMethod Detail |
---|
public boolean equals(Object o)
equals
in class Object
o
- the object to be tested for equality with this one
public String getDescription()
public void setDescription(String description)
description
- the new value of descriptionpublic String toString()
toString
in class Object
public void use()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |