|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sourceforge.worldsaver.rp.RpBase
Almost everything in this package extends this superclass.
Fields inherited from interface net.sourceforge.worldsaver.util.MiscUtils |
CONSOLE_WIDTH, NEWLINE, RANDOM |
Constructor Summary | |
RpBase(java.util.HashMap loaded)
Reconstructs the object by a loaded String. |
|
RpBase(RpBase father,
java.lang.String name)
Constructs a new object with a given name and a given father. |
Method Summary | |
void |
addChild(RpBase val)
Adds the given object to the childs. |
void |
addDescription(java.lang.String val)
Appends the given String to the descrption of this object. |
abstract RpBase |
copy(boolean childs,
boolean full)
Returns a new object with the same values as this object. |
java.util.Iterator |
getChilds()
Returns an iterator with the childs of this object. |
java.lang.String |
getDescription(boolean returnChilds,
boolean full)
Returns the description of this object. |
RpBase |
getFather()
Returns the father of this object. |
long |
getID()
Returns the unique ID of this instance. |
java.lang.String |
getName()
Returns the name of the object. |
void |
getReferencesRight(java.util.HashMap pool,
IDGenerator gen)
Gets the references right by getting them out of the pool. |
java.lang.String |
getSaveableString()
Returns the String describing this object. |
void |
setDescription(java.lang.String val)
Sets the description of the object. |
void |
setFather(RpBase val)
Uses the given value as new father. |
void |
setName(java.lang.String val)
Changes the name of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RpBase(RpBase father, java.lang.String name)
father
- the father object, may be nullname
- the namepublic RpBase(java.util.HashMap loaded)
loaded
- the String which contains all the informationgen
- the IDGenerator that is already initialized with the
used valuesMethod Detail |
public void getReferencesRight(java.util.HashMap pool, IDGenerator gen)
getReferencesRight
in interface Saveable
pool
- the HashMap with all objects of the current sessionpublic long getID()
public java.lang.String getName()
public java.lang.String getDescription(boolean returnChilds, boolean full)
returnChilds
- true means to return the child descriptions,
too.full
- true means return also the child's description etc.public java.util.Iterator getChilds()
public RpBase getFather()
public void setName(java.lang.String val)
val
- the new namepublic void setDescription(java.lang.String val)
val
- the descriptionpublic void addDescription(java.lang.String val)
val
- the String to appendpublic void addChild(RpBase val)
val
- the object to addpublic void setFather(RpBase val)
val
- the new fatherpublic java.lang.String getSaveableString() throws java.io.IOException
getSaveableString
in interface Saveable
java.io.IOException
- if the objects are not validpublic abstract RpBase copy(boolean childs, boolean full)
childs
- true means copy the childs, toofull
- true means copy the childs of the childs etc., too
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |