net.sourceforge.worldsaver.rp
Class Stuff

java.lang.Object
  |
  +--net.sourceforge.worldsaver.rp.RpBase
        |
        +--net.sourceforge.worldsaver.rp.Item
              |
              +--net.sourceforge.worldsaver.rp.Stuff
All Implemented Interfaces:
MiscUtils, Saveable

public class Stuff
extends Item

Represents all items which have no own class.

Version:
Feb 16 2001
Author:
Andreas Schmitz

Fields inherited from interface net.sourceforge.worldsaver.util.MiscUtils
CONSOLE_WIDTH, NEWLINE, RANDOM
 
Constructor Summary
Stuff(java.util.HashMap map)
          Standard constructor.
Stuff(RpBase father, java.lang.String name)
          Standard constructor.
 
Method Summary
 RpBase copy(boolean childs, boolean full)
          Returns a new object with the same values as this object.
 java.lang.String getSaveableString()
          Returns the saveable String.
 
Methods inherited from class net.sourceforge.worldsaver.rp.RpBase
addChild, addDescription, getChilds, getDescription, getFather, getID, getName, getReferencesRight, setDescription, setFather, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stuff

public Stuff(RpBase father,
             java.lang.String name)
Standard constructor.
See Also:
RpBase.RpBase(net.sourceforge.worldsaver.rp.RpBase, java.lang.String), Item.Item(net.sourceforge.worldsaver.rp.RpBase, java.lang.String)

Stuff

public Stuff(java.util.HashMap map)
Standard constructor.
See Also:
RpBase.RpBase(net.sourceforge.worldsaver.rp.RpBase, java.lang.String), Item.Item(net.sourceforge.worldsaver.rp.RpBase, java.lang.String)
Method Detail

getSaveableString

public java.lang.String getSaveableString()
                                   throws java.io.IOException
Returns the saveable String.
Overrides:
getSaveableString in class RpBase
Returns:
the String

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, too
full - true means copy the childs of the childs etc., too
Returns:
the new object (the father of all childs)