Jacson

de.spieleck.config
Interface ConfigNode

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ConfigFileNode, ConfigNodeImpl, ConfigSafeNode, EmptyConfigNode

public interface ConfigNode
extends java.io.Serializable

Basic interface to programm against when using the Config tool.

Version:
1.0
Author:
fsn

Method Summary
 java.util.Iterator children()
          Enumerate my children.
 java.util.Iterator childrenNamed(java.lang.String key)
          Enumerate children of me, having a certain name.
 int countChildren()
          Count the number of children we have.
 int countChildrenNamed(java.lang.String key)
          Count the number of children we have.
 boolean getBoolean()
          Get (expanded) value as a boolean.
 boolean getBoolean(java.lang.String path, boolean deflt)
          Get (expanded) value of subnode as boolean, using default if necessary.
 ConfigFileNode getBranchNode()
          Find the node responsible for reading this node from file.
 double getDouble()
          Get (expanded) value as a double.
 double getDouble(java.lang.String path, double deflt)
          Get (expanded) value of subnode as double, using default when necessary.
 boolean getInhBoolean(java.lang.String path, boolean deflt)
          Get (expanded) value of subnode as boolean searching parent nodes before using default.
 double getInhDouble(java.lang.String path, double deflt)
          Get (expanded) value of subnode as double searching parent nodes before using default.
 int getInhInt(java.lang.String path, int deflt)
          Get (expanded) value of subnode as int searching parent nodes before using default.
 java.lang.String getInhString(java.lang.String path, java.lang.String deflt)
          Get (expanded) value of subnode as String searching parent nodes before using default.
 int getInt()
          Get (expanded) value as an integer.
 int getInt(java.lang.String path, int deflt)
          Get (expanded) value of subnode as integer, using default when necessary.
 java.lang.String getName()
          Get the name of the node.
 ConfigNode getParent()
          Get the node above.
 java.lang.String getPath()
          Get the complete path of the node.
 java.lang.String getSourceDescription()
          Get something describing the source location of this node.
 java.lang.String getString()
          Get (expanded) value as String.
 java.lang.String getString(java.lang.String path, java.lang.String deflt)
          Get (expanded) value of subnode as String, using default when necessary.
 java.lang.String getUnexpanded()
          Get (expanded) value as String.
 ConfigNode node(java.lang.String path)
          Find sub node matching name.
 ConfigNode nodeInh(java.lang.String path)
          Find node or parent sub node matching name.
 void printXML(java.io.PrintWriter os)
          Pretty print this node with its whole subtree.
 

Method Detail

node

public ConfigNode node(java.lang.String path)
Find sub node matching name.


nodeInh

public ConfigNode nodeInh(java.lang.String path)
Find node or parent sub node matching name.


getBranchNode

public ConfigFileNode getBranchNode()
Find the node responsible for reading this node from file.


getName

public java.lang.String getName()
Get the name of the node.


getPath

public java.lang.String getPath()
Get the complete path of the node.


getParent

public ConfigNode getParent()
Get the node above.


getBoolean

public boolean getBoolean()
Get (expanded) value as a boolean.


getInt

public int getInt()
Get (expanded) value as an integer.


getDouble

public double getDouble()
Get (expanded) value as a double.


getUnexpanded

public java.lang.String getUnexpanded()
Get (expanded) value as String.


getString

public java.lang.String getString()
Get (expanded) value as String.


getBoolean

public boolean getBoolean(java.lang.String path,
                          boolean deflt)
Get (expanded) value of subnode as boolean, using default if necessary.


getInt

public int getInt(java.lang.String path,
                  int deflt)
Get (expanded) value of subnode as integer, using default when necessary.


getDouble

public double getDouble(java.lang.String path,
                        double deflt)
Get (expanded) value of subnode as double, using default when necessary.


getString

public java.lang.String getString(java.lang.String path,
                                  java.lang.String deflt)
Get (expanded) value of subnode as String, using default when necessary.


getInhBoolean

public boolean getInhBoolean(java.lang.String path,
                             boolean deflt)
Get (expanded) value of subnode as boolean searching parent nodes before using default.


getInhInt

public int getInhInt(java.lang.String path,
                     int deflt)
Get (expanded) value of subnode as int searching parent nodes before using default.


getInhDouble

public double getInhDouble(java.lang.String path,
                           double deflt)
Get (expanded) value of subnode as double searching parent nodes before using default.


getInhString

public java.lang.String getInhString(java.lang.String path,
                                     java.lang.String deflt)
Get (expanded) value of subnode as String searching parent nodes before using default.


countChildren

public int countChildren()
Count the number of children we have.


children

public java.util.Iterator children()
Enumerate my children.


childrenNamed

public java.util.Iterator childrenNamed(java.lang.String key)
Enumerate children of me, having a certain name.


countChildrenNamed

public int countChildrenNamed(java.lang.String key)
Count the number of children we have.


printXML

public void printXML(java.io.PrintWriter os)
              throws java.io.IOException
Pretty print this node with its whole subtree.

Throws:
java.io.IOException

getSourceDescription

public java.lang.String getSourceDescription()
Get something describing the source location of this node.


Spieleck

Copyleft 2002 spieleck.de.