org.javimmutable.collections.tree_list
Class LeafNode<T>

java.lang.Object
  extended by org.javimmutable.collections.tree_list.TreeNode<T>
      extended by org.javimmutable.collections.tree_list.LeafNode<T>
All Implemented Interfaces:
Cursorable<T>

@Immutable
public class LeafNode<T>
extends TreeNode<T>


Constructor Summary
LeafNode(T value)
           
 
Method Summary
 UpdateResult<T> assign(int index, T value)
           
 Cursor<T> cursor()
           
 DeleteResult<T> delete(int index)
           
 T get(int index)
           
 int getSize()
           
 UpdateResult<T> insertAfter(int index, T value)
           
 UpdateResult<T> insertBefore(int index, T value)
           
 DeleteMergeResult<T> leftDeleteMerge(TreeNode<T> node)
           
 DeleteMergeResult<T> rightDeleteMerge(TreeNode<T> node)
           
 String toString()
           
 int verifyDepthsMatch()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LeafNode

public LeafNode(T value)
Method Detail

getSize

public int getSize()
Specified by:
getSize in class TreeNode<T>

get

public T get(int index)
Specified by:
get in class TreeNode<T>

insertBefore

public UpdateResult<T> insertBefore(int index,
                                    T value)
Specified by:
insertBefore in class TreeNode<T>

insertAfter

public UpdateResult<T> insertAfter(int index,
                                   T value)
Specified by:
insertAfter in class TreeNode<T>

assign

public UpdateResult<T> assign(int index,
                              T value)
Specified by:
assign in class TreeNode<T>

delete

public DeleteResult<T> delete(int index)
Specified by:
delete in class TreeNode<T>

verifyDepthsMatch

public int verifyDepthsMatch()
Specified by:
verifyDepthsMatch in class TreeNode<T>

leftDeleteMerge

public DeleteMergeResult<T> leftDeleteMerge(TreeNode<T> node)
Specified by:
leftDeleteMerge in class TreeNode<T>

rightDeleteMerge

public DeleteMergeResult<T> rightDeleteMerge(TreeNode<T> node)
Specified by:
rightDeleteMerge in class TreeNode<T>

toString

public String toString()
Overrides:
toString in class Object

cursor

@Nonnull
public Cursor<T> cursor()
Specified by:
cursor in interface Cursorable<T>
Specified by:
cursor in class TreeNode<T>


Copyright © 2014 Burton Computer Corporation. All rights reserved.