net.sourceforge.worldsaver.rp
Class Building
java.lang.Object
|
+--net.sourceforge.worldsaver.rp.RpBase
|
+--net.sourceforge.worldsaver.rp.Area
|
+--net.sourceforge.worldsaver.rp.Building
- All Implemented Interfaces:
- MiscUtils, Saveable
- public class Building
- extends Area
- implements Saveable
This class represents a building.
- Version:
- Feb 16 2001
- Author:
- Andreas Schmitz
Constructor Summary |
Building(java.util.HashMap map)
The other standard constructor, for details see area class and
rpbase. |
Building(RpBase father,
java.lang.String name,
int x,
int y)
The standard constructor, for details see the area class. |
Method Summary |
RpBase |
copy(boolean childs,
boolean full)
Returns a complete copy of this 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 saveable String for this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Building
public Building(RpBase father,
java.lang.String name,
int x,
int y)
- The standard constructor, for details see the area class.
- Parameters:
father
- the father objectname
- the namex
- the width of the mapy
- the height of the map- See Also:
Area.Area(net.sourceforge.worldsaver.rp.RpBase, java.lang.String, int, int)
Building
public Building(java.util.HashMap map)
- The other standard constructor, for details see area class and
rpbase.
- Parameters:
map
- the values- See Also:
Area.Area(net.sourceforge.worldsaver.rp.RpBase, java.lang.String, int, int)
,
RpBase.RpBase(net.sourceforge.worldsaver.rp.RpBase, java.lang.String)
getReferencesRight
public void getReferencesRight(java.util.HashMap pool,
IDGenerator gen)
- Gets the references right by getting them out of the pool. This
method has to be called after loading the whole thing.
- Specified by:
getReferencesRight
in interface Saveable
- Overrides:
getReferencesRight
in class Area
- Parameters:
pool
- the HashMap with all objects of the current sessiongen
- the id-Generator- See Also:
Loader
getSaveableString
public java.lang.String getSaveableString()
throws java.io.IOException
- Returns the saveable String for this object.
- Specified by:
getSaveableString
in interface Saveable
- Overrides:
getSaveableString
in class Area
- Returns:
- the String
copy
public RpBase copy(boolean childs,
boolean full)
- Returns a complete copy of this object.
- Overrides:
copy
in class RpBase
- Parameters:
childs
- whether to copy the childsfull
- whether to copy all references- Returns:
- the new object
- See Also:
RpBase.copy(boolean, boolean)
,
RpBase.copy(boolean, boolean)