net.sourceforge.worldsaver.rp
Class Person

java.lang.Object
  |
  +--net.sourceforge.worldsaver.rp.RpBase
        |
        +--net.sourceforge.worldsaver.rp.Person
All Implemented Interfaces:
MiscUtils, Saveable
Direct Known Subclasses:
Civilist, Hero, Merchant

public abstract class Person
extends RpBase
implements MiscUtils, Saveable

The abstract superclass of all persons.

Version:
Feb 11 2001
Author:
Andreas Schmitz

Fields inherited from interface net.sourceforge.worldsaver.util.MiscUtils
CONSOLE_WIDTH, NEWLINE, RANDOM
 
Constructor Summary
Person(java.util.HashMap map)
          The standard constructor.
Person(RpBase father, java.lang.String name)
          The standard constructor.
 
Method Summary
 void addPossession(RpBase val)
          Adds anything to the possessions of this person.
 java.util.Iterator getPossessions()
          Returns an iterator containing all the possessions of the person.
 void getReferencesRight(java.util.HashMap pool, IDGenerator gen)
          See RpBase for details.
 java.lang.String getSaveableString()
          See RpBase for details.
 
Methods inherited from class net.sourceforge.worldsaver.rp.RpBase
addChild, addDescription, copy, getChilds, getDescription, getFather, getID, getName, setDescription, setFather, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Person

public Person(RpBase father,
              java.lang.String name)
The standard constructor.
See Also:
RpBase.RpBase(net.sourceforge.worldsaver.rp.RpBase, java.lang.String)

Person

public Person(java.util.HashMap map)
The standard constructor.
See Also:
RpBase.RpBase(net.sourceforge.worldsaver.rp.RpBase, java.lang.String)
Method Detail

getReferencesRight

public void getReferencesRight(java.util.HashMap pool,
                               IDGenerator gen)
See RpBase for details.
Specified by:
getReferencesRight in interface Saveable
Overrides:
getReferencesRight in class RpBase
See Also:
RpBase.getReferencesRight(java.util.HashMap, net.sourceforge.worldsaver.util.IDGenerator)

getSaveableString

public java.lang.String getSaveableString()
                                   throws java.io.IOException
See RpBase for details.
Specified by:
getSaveableString in interface Saveable
Overrides:
getSaveableString in class RpBase
See Also:
RpBase.getSaveableString()

getPossessions

public java.util.Iterator getPossessions()
Returns an iterator containing all the possessions of the person.
Returns:
the iterator

addPossession

public void addPossession(RpBase val)
Adds anything to the possessions of this person.
Parameters:
val - the object to add