gecco.server.startup
Class PropertyTree

java.lang.Object
  |
  +--gecco.server.startup.PropertyTree
All Implemented Interfaces:
DeepCloneable

public class PropertyTree
extends Object
implements DeepCloneable

Description of the Class

Author:
Karl Hasselström

Field Summary
private  LinkedList parents
          Description of the Field
private  DeepCloneHashMap propertyMap
          Description of the Field
private  DeepCloneHashMap variableMap
          Description of the Field
 
Constructor Summary
  PropertyTree()
          Constructor for the PropertyTree object
private PropertyTree(PropertyTree parent)
          Constructor for the PropertyTree object
 
Method Summary
 DeepCloneable deepClone()
          Description of the Method
 List get(String property)
          Description of the Method
 List getDoubleList(String property)
          Gets the DoubleList attribute of the PropertyTree object
 List getIntegerList(String property)
          Gets the IntegerList attribute of the PropertyTree object
 Object getSingle(String property)
          Gets the Single attribute of the PropertyTree object
 double getSingleDouble(String property)
          Gets the SingleDouble attribute of the PropertyTree object
 int getSingleInt(String property)
          Gets the SingleInt attribute of the PropertyTree object
 String getSingleString(String property)
          Gets the SingleString attribute of the PropertyTree object
 PropertyTree getSingleSubtree(String property)
          Gets the SingleSubtree attribute of the PropertyTree object
 List getStringList(String property)
          Gets the StringList attribute of the PropertyTree object
 List getSubtreeList(String property)
          Gets the SubtreeList attribute of the PropertyTree object
 List getVariable(String variable)
          Gets the Variable attribute of the PropertyTree object
private  void parse(StreamTokenizer tok)
          Description of the Method
private  void parseProperty(StreamTokenizer tok)
          Description of the Method
private  Object parseSingleValue(StreamTokenizer tok)
          Description of the Method
 void parseStream(Reader in)
          Description of the Method
private  Object parseValue(StreamTokenizer tok)
          Description of the Method
 void put(String property, List values)
          Description of the Method
 void put(String property, PropertyTree subtree)
          Description of the Method
 void put(String property, String value)
          Description of the Method
 void putAll(PropertyTree other)
          Description of the Method
private  void putObject(String property, Object value)
          Description of the Method
private  void putObjectVariable(String variable, Object value)
          Description of the Method
 void putVariable(String variable, List values)
          Description of the Method
 void putVariable(String variable, PropertyTree subtree)
          Description of the Method
 void putVariable(String variable, String value)
          Description of the Method
 String toString()
          Description of the Method
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

propertyMap

private DeepCloneHashMap propertyMap
Description of the Field

variableMap

private DeepCloneHashMap variableMap
Description of the Field

parents

private LinkedList parents
Description of the Field
Constructor Detail

PropertyTree

public PropertyTree()
Constructor for the PropertyTree object

PropertyTree

private PropertyTree(PropertyTree parent)
Constructor for the PropertyTree object
Parameters:
parent - Description of Parameter
Method Detail

get

public List get(String property)
Description of the Method
Parameters:
property - Description of Parameter
Returns:
Description of the Returned Value

getVariable

public List getVariable(String variable)
Gets the Variable attribute of the PropertyTree object
Parameters:
variable - Description of Parameter
Returns:
The Variable value

getSingle

public Object getSingle(String property)
                 throws ParseErrorException
Gets the Single attribute of the PropertyTree object
Parameters:
property - Description of Parameter
Returns:
The Single value
Throws:
ParseErrorException - Description of Exception

getSingleInt

public int getSingleInt(String property)
                 throws ParseErrorException
Gets the SingleInt attribute of the PropertyTree object
Parameters:
property - Description of Parameter
Returns:
The SingleInt value
Throws:
ParseErrorException - Description of Exception

getSingleDouble

public double getSingleDouble(String property)
                       throws ParseErrorException
Gets the SingleDouble attribute of the PropertyTree object
Parameters:
property - Description of Parameter
Returns:
The SingleDouble value
Throws:
ParseErrorException - Description of Exception

getSingleString

public String getSingleString(String property)
                       throws ParseErrorException
Gets the SingleString attribute of the PropertyTree object
Parameters:
property - Description of Parameter
Returns:
The SingleString value
Throws:
ParseErrorException - Description of Exception

getSingleSubtree

public PropertyTree getSingleSubtree(String property)
                              throws ParseErrorException
Gets the SingleSubtree attribute of the PropertyTree object
Parameters:
property - Description of Parameter
Returns:
The SingleSubtree value
Throws:
ParseErrorException - Description of Exception

getIntegerList

public List getIntegerList(String property)
                    throws ParseErrorException
Gets the IntegerList attribute of the PropertyTree object
Parameters:
property - Description of Parameter
Returns:
The IntegerList value
Throws:
ParseErrorException - Description of Exception

getDoubleList

public List getDoubleList(String property)
                   throws ParseErrorException
Gets the DoubleList attribute of the PropertyTree object
Parameters:
property - Description of Parameter
Returns:
The DoubleList value
Throws:
ParseErrorException - Description of Exception

getStringList

public List getStringList(String property)
                   throws ParseErrorException
Gets the StringList attribute of the PropertyTree object
Parameters:
property - Description of Parameter
Returns:
The StringList value
Throws:
ParseErrorException - Description of Exception

getSubtreeList

public List getSubtreeList(String property)
                    throws ParseErrorException
Gets the SubtreeList attribute of the PropertyTree object
Parameters:
property - Description of Parameter
Returns:
The SubtreeList value
Throws:
ParseErrorException - Description of Exception

put

public void put(String property,
                String value)
Description of the Method
Parameters:
property - Description of Parameter
value - Description of Parameter

put

public void put(String property,
                PropertyTree subtree)
Description of the Method
Parameters:
property - Description of Parameter
subtree - Description of Parameter

put

public void put(String property,
                List values)
Description of the Method
Parameters:
property - Description of Parameter
values - Description of Parameter

putVariable

public void putVariable(String variable,
                        String value)
Description of the Method
Parameters:
variable - Description of Parameter
value - Description of Parameter

putVariable

public void putVariable(String variable,
                        PropertyTree subtree)
Description of the Method
Parameters:
variable - Description of Parameter
subtree - Description of Parameter

putVariable

public void putVariable(String variable,
                        List values)
Description of the Method
Parameters:
variable - Description of Parameter
values - Description of Parameter

putAll

public void putAll(PropertyTree other)
Description of the Method
Parameters:
other - Description of Parameter

parseStream

public void parseStream(Reader in)
                 throws IOException,
                        SyntaxErrorException
Description of the Method
Parameters:
in - Description of Parameter
Throws:
IOException - Description of Exception
SyntaxErrorException - Description of Exception

toString

public String toString()
Description of the Method
Overrides:
toString in class Object
Returns:
Description of the Returned Value

deepClone

public DeepCloneable deepClone()
Description of the Method
Specified by:
deepClone in interface DeepCloneable
Returns:
Description of the Returned Value

putObject

private void putObject(String property,
                       Object value)
Description of the Method
Parameters:
property - Description of Parameter
value - Description of Parameter

putObjectVariable

private void putObjectVariable(String variable,
                               Object value)
Description of the Method
Parameters:
variable - Description of Parameter
value - Description of Parameter

parse

private void parse(StreamTokenizer tok)
            throws IOException,
                   SyntaxErrorException
Description of the Method
Parameters:
tok - Description of Parameter
Throws:
IOException - Description of Exception
SyntaxErrorException - Description of Exception

parseProperty

private void parseProperty(StreamTokenizer tok)
                    throws IOException,
                           SyntaxErrorException
Description of the Method
Parameters:
tok - Description of Parameter
Throws:
IOException - Description of Exception
SyntaxErrorException - Description of Exception

parseValue

private Object parseValue(StreamTokenizer tok)
                   throws IOException,
                          SyntaxErrorException
Description of the Method
Parameters:
tok - Description of Parameter
Returns:
Description of the Returned Value
Throws:
IOException - Description of Exception
SyntaxErrorException - Description of Exception

parseSingleValue

private Object parseSingleValue(StreamTokenizer tok)
                         throws IOException,
                                SyntaxErrorException
Description of the Method
Parameters:
tok - Description of Parameter
Returns:
Description of the Returned Value
Throws:
IOException - Description of Exception
SyntaxErrorException - Description of Exception