Package org.parboiled.trees
Class ImmutableBinaryTreeNode<T extends BinaryTreeNode<T>>
- java.lang.Object
-
- org.parboiled.trees.ImmutableGraphNode<T>
-
- org.parboiled.trees.ImmutableTreeNode<T>
-
- 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 theBinaryTreeNode
interface.
-
-
Constructor Summary
Constructors Constructor Description ImmutableBinaryTreeNode(T left, T right)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.GraphNode
getChildren
-
-
-
-
Method Detail
-
left
public T left()
Description copied from interface:BinaryTreeNode
Returns the left sub node.- Specified by:
left
in interfaceBinaryTreeNode<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 interfaceBinaryTreeNode<T extends BinaryTreeNode<T>>
- Returns:
- the right sub node
-
-