net.sourceforge.servletspy
Class Node

java.lang.Object
  extended bynet.sourceforge.servletspy.Node
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public final class Node
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

A Node represents the result of a serialization process.

Author:
arno schumacher
See Also:
Serialized Form

Constructor Summary
Node(Node pParent, java.lang.String pName)
          Constructor.
Node(Node pParent, java.lang.String pName, java.lang.String pValue)
          Constructor.
Node(java.lang.String pName, java.lang.String pValue)
          Constructor.
 
Method Summary
 void addChildNode(Node pChild)
          Adds a child node.
 java.util.Iterator childNodes()
          Returns the childs.
 int compareTo(java.lang.Object pArg)
           
 java.lang.String getDebugHint()
          For debugging purpose only.
 java.lang.String getName()
           
 int getNumberOfChild()
          Returns the number of childs.
 Node getParent()
           
 Node getReference()
          Returns the reference node.
 java.lang.String getValue()
           
 boolean hasChildNodes()
           
 boolean hasReference()
          Returns true if and only if this node does not hold a serialization graph, but points to an other node representing an already performed serialization.
 void setDebugHint(java.lang.String pHint)
          For debugging purpose only.
 void setReference(Node pReferenceNode)
          Sets the reference node.
 void setValue(java.lang.String pValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Node

public Node(java.lang.String pName,
            java.lang.String pValue)
Constructor.

Parameters:
pName - The node name
pValue - The initial value of the node

Node

public Node(Node pParent,
            java.lang.String pName)
Constructor.

Parameters:
pParent - The parent node
pName - The node name

Node

public Node(Node pParent,
            java.lang.String pName,
            java.lang.String pValue)
Constructor.

Parameters:
pParent - The parent node
pName - The node name
pValue - The initial value of the node
Method Detail

compareTo

public int compareTo(java.lang.Object pArg)
Specified by:
compareTo in interface java.lang.Comparable

getValue

public java.lang.String getValue()
Returns:
Returns the value.

setValue

public void setValue(java.lang.String pValue)
Parameters:
pValue - The value to set.

getName

public java.lang.String getName()
Returns:
Returns the name.

getParent

public Node getParent()
Returns:
Returns the parent.

hasChildNodes

public boolean hasChildNodes()
Returns:
Returns true if and only if the node has child nodes.

addChildNode

public void addChildNode(Node pChild)
Adds a child node.

Parameters:
pChild - The child.

childNodes

public java.util.Iterator childNodes()
Returns the childs.

Returns:
The childs

getNumberOfChild

public int getNumberOfChild()
Returns the number of childs.

Returns:
The number of childs.

setReference

public void setReference(Node pReferenceNode)
Sets the reference node.

Parameters:
pReferenceNode - The refernce node, a pointer to another node in the serialization graph representing an already processed subject.

getReference

public Node getReference()
Returns the reference node.

Returns:
The refernce node, a pointer to another node in the serialization graph representing an already processed subject.

hasReference

public boolean hasReference()
Returns true if and only if this node does not hold a serialization graph, but points to an other node representing an already performed serialization.

Returns:
boolean value

setDebugHint

public void setDebugHint(java.lang.String pHint)
For debugging purpose only.

Parameters:
pHint - A hint

getDebugHint

public java.lang.String getDebugHint()
For debugging purpose only.

Returns:
the debug hint


Copyright 2005-2005-2006 Arno Schumacher. All Rights Reserved.