public class Item
extends java.lang.Object
Constructor and Description |
---|
Item(java.lang.String description)
Constructor for objects of type Item
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Returns true if this object and the object under test have the
same value in the description property.
|
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
|
public Item(java.lang.String description)
description
- value for the descriptionpublic java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- the new value of descriptionpublic void use()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the object to be tested for equality with this one