org.parboiled.trees
Class ImmutableBinaryTreeNode<T extends BinaryTreeNode<T>>

java.lang.Object
  extended by org.parboiled.trees.ImmutableGraphNode<T>
      extended by org.parboiled.trees.ImmutableTreeNode<T>
          extended by org.parboiled.trees.ImmutableBinaryTreeNode<T>
Type Parameters:
T - the actual implementation type of this ImmutableBinaryTreeNode
All Implemented Interfaces:
BinaryTreeNode<T>, GraphNode<T>, TreeNode<T>

public class ImmutableBinaryTreeNode<T extends BinaryTreeNode<T>>
extends ImmutableTreeNode<T>
implements BinaryTreeNode<T>

A simple immutable implementation of the BinaryTreeNode interface.


Constructor Summary
ImmutableBinaryTreeNode(T left, T right)
           
 
Method Summary
 T left()
          Returns the left sub node.
 T right()
          Returns the right sub node.
 
Methods inherited from class org.parboiled.trees.ImmutableTreeNode
acquireChildren, getParent
 
Methods inherited from class org.parboiled.trees.ImmutableGraphNode
getChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.parboiled.trees.TreeNode
getParent
 
Methods inherited from interface org.parboiled.trees.GraphNode
getChildren
 

Constructor Detail

ImmutableBinaryTreeNode

public ImmutableBinaryTreeNode(T left,
                               T right)
Method Detail

left

public T left()
Description copied from interface: BinaryTreeNode
Returns the left sub node.

Specified by:
left in interface BinaryTreeNode<T extends BinaryTreeNode<T>>
Returns:
the left sub node

right

public T right()
Description copied from interface: BinaryTreeNode
Returns the right sub node.

Specified by:
right in interface BinaryTreeNode<T extends BinaryTreeNode<T>>
Returns:
the right sub node