net.sourceforge.worldsaver.rp
Class City
java.lang.Object
|
+--net.sourceforge.worldsaver.rp.RpBase
|
+--net.sourceforge.worldsaver.rp.Area
|
+--net.sourceforge.worldsaver.rp.City
- All Implemented Interfaces:
- MiscUtils, Saveable
- public class City
- extends Area
This class represents a City.
- Version:
- Feb 16 2001
- Author:
- Andreas Schmitz
Constructor Summary |
City(java.util.HashMap map)
Standard constructor. |
City(RpBase father,
java.lang.String name,
int x,
int y)
Standard constructor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
City
public City(RpBase father,
java.lang.String name,
int x,
int y)
- Standard constructor.
- See Also:
RpBase.RpBase(net.sourceforge.worldsaver.rp.RpBase, java.lang.String)
,
Area.Area(net.sourceforge.worldsaver.rp.RpBase, java.lang.String, int, int)
City
public City(java.util.HashMap map)
- Standard constructor.
- See Also:
RpBase.RpBase(net.sourceforge.worldsaver.rp.RpBase, java.lang.String)
,
Area.Area(net.sourceforge.worldsaver.rp.RpBase, java.lang.String, int, int)
setRandomEncounter
public void setRandomEncounter(RpBase val)
getSaveableString
public java.lang.String getSaveableString()
throws java.io.IOException
- Returns a ready-to-go saveable String.
- Overrides:
getSaveableString
in class Area
- Returns:
- the string
getRandomEncounter
public RandomEncounter getRandomEncounter()
copy
public RpBase copy(boolean childs,
boolean full)
- Description copied from class:
RpBase
- Returns a new object with the same values as this object. This
method copies the fields of the object and all childs, but not
the father. Also, every object is created new and a new
IDGenerator is created (there are also made new IDs for every
object). Note that only every non-abstract subclass should
write this method. Like the getDescription method, you can
choose whether and how the childs are treated.
- Overrides:
copy
in class RpBase
- Following copied from class:
net.sourceforge.worldsaver.rp.RpBase
- Parameters:
childs
- true means copy the childs, toofull
- true means copy the childs of the childs etc., too- Returns:
- the new object (the father of all childs)