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

Fields inherited from interface net.sourceforge.worldsaver.util.MiscUtils
CONSOLE_WIDTH, NEWLINE, RANDOM
 
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 net.sourceforge.worldsaver.rp.Area
getMap, getMapX, getMapY, getVisualization, setMap, setMapX, setMapY, setVisualization
 
Methods inherited from class net.sourceforge.worldsaver.rp.RpBase
addChild, addDescription, 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

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 object
name - the name
x - the width of the map
y - 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)
Method Detail

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 session
gen - 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 childs
full - whether to copy all references
Returns:
the new object
See Also:
RpBase.copy(boolean, boolean), RpBase.copy(boolean, boolean)