|
|||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||
ObjectAdvObjectMagicSuperclass
AdvObject
public class AdvObject
This class defines an object in the Adventure game. An object is characterized by the following properties:
| Method Summary | |
|---|---|
String |
getDescription()
Returns the one-line description of the object. |
int |
getInitialLocation()
Returns the initial location of the object. |
String |
getName()
Returns the object name, which is the word used to refer to it. |
static AdvObject |
readObject(BufferedReader rd)
Creates a new object by reading its data from the specified reader. |
| Methods inherited from class AdvObjectMagicSuperclass |
|---|
toString |
| Methods inherited from class Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public String getName()
getName in class AdvObjectMagicSuperclasspublic String getDescription()
getDescription in class AdvObjectMagicSuperclasspublic int getInitialLocation()
getInitialLocation in class AdvObjectMagicSuperclasspublic static AdvObject readObject(BufferedReader rd)
null instead of an AdvObject value.
Note that this is a static method, which means that you need
to call
AdvObject.readObject(rd)
rd - The reader from which the object data is read
|
|||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||