com.huguesjohnson.tiamat
Class NamedObject
java.lang.Object
com.huguesjohnson.tiamat.NamedObject
- All Implemented Interfaces:
- Storable
- Direct Known Subclasses:
- Attribute, Item, Skill
- public abstract class NamedObject
- extends java.lang.Object
- implements Storable
NamedObject - an abstract class with a name and description
- Author:
- Hugues Johnson
|
Constructor Summary |
NamedObject(java.lang.String name,
java.lang.String description)
|
|
Method Summary |
java.lang.String |
getDescription()
|
java.lang.String |
getName()
|
void |
onDeserialize(Formatter formatter,
java.lang.String absoluteDir)
The onDeserialize event should be fired after an object is de-serialized. |
void |
setDescription(java.lang.String description)
|
void |
setName(java.lang.String name)
|
java.lang.String |
toString()
returns a string representation of the object |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NamedObject
public NamedObject(java.lang.String name,
java.lang.String description)
getName
public java.lang.String getName()
setName
public void setName(java.lang.String name)
getDescription
public java.lang.String getDescription()
setDescription
public void setDescription(java.lang.String description)
toString
public java.lang.String toString()
- returns a string representation of the object
onDeserialize
public void onDeserialize(Formatter formatter,
java.lang.String absoluteDir)
- The onDeserialize event should be fired after an object is de-serialized.
This allows objects to load transient members, set their working directory, and load Storable members if needed.
- Specified by:
onDeserialize in interface Storable
- Parameters:
formatter - the formatter to use to load any storable membersabsoluteDir - the working directory since all paths stored in the object should be relative