SienaXML (v.2.0.0) API documentation

siena.xml.xpath
Class BinaryNode

java.lang.Object
  extended by siena.xml.xpath.BinaryNode

public class BinaryNode
extends java.lang.Object

This object represents a node in a Binary Tree. It has two children, left and right, and space to store a single user object.


Constructor Summary
BinaryNode()
          Constructor
 
Method Summary
 java.lang.Object getData()
          Return the user data
 BinaryNode getLeftChild()
          Returns the left child of the node
 BinaryNode getRightChild()
          Returns the right child of the node
 boolean isLeaf()
          Returns if this node is a leaf node in the tree.
 void setData(java.lang.Object newData)
          Sets the user data
 void setLeaf()
          Sets that this node is a leaf node.
 void setLeftChild(BinaryNode node)
          Sets the left child of this node
 void setRightChild(BinaryNode node)
          Sets the right child of the node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryNode

public BinaryNode()
Constructor

Method Detail

setLeftChild

public void setLeftChild(BinaryNode node)
Sets the left child of this node

Parameters:
node - Node to be set as the left child.

setRightChild

public void setRightChild(BinaryNode node)
Sets the right child of the node

Parameters:
node - Node to be set as the right child.

setData

public void setData(java.lang.Object newData)
Sets the user data

Parameters:
newData - User data

getLeftChild

public BinaryNode getLeftChild()
Returns the left child of the node

Returns:
BinaryNode object that is the left child of this node.

getRightChild

public BinaryNode getRightChild()
Returns the right child of the node

Returns:
BinaryNode object that is the right child of this node.

getData

public java.lang.Object getData()
Return the user data

Returns:
Object that was set by the previous call to setData.

setLeaf

public void setLeaf()
Sets that this node is a leaf node.


isLeaf

public boolean isLeaf()
Returns if this node is a leaf node in the tree.

Returns:
Returns true if this node is a leaf.

SienaXML (v.2.0.0) API documentation

Copyright © 2000-2002 University of Colorado.
This documentation is maintained by Antonio Carzaniga