org.javimmutable.collections.tree
Class UpdateResult<K,V>

java.lang.Object
  extended by org.javimmutable.collections.tree.UpdateResult<K,V>

@Immutable
public class UpdateResult<K,V>
extends Object


Nested Class Summary
static class UpdateResult.Type
           
 
Field Summary
 TreeNode<K,V> extraNode
           
 TreeNode<K,V> newNode
           
 int sizeDelta
           
 UpdateResult.Type type
           
 
Method Summary
static
<K,V> UpdateResult<K,V>
createInPlace(TreeNode<K,V> newNode, int sizeDelta)
           
 TreeNode<K,V> createLeftThreeNode(TreeNode<K,V> right, K rightMax)
           
 TreeNode<K,V> createLeftTwoNode(TreeNode<K,V> right, K rightMax)
           
 TreeNode<K,V> createRightThreeNode(TreeNode<K,V> left, K leftMax)
           
 TreeNode<K,V> createRightTwoNode(TreeNode<K,V> left, K leftMax)
           
static
<K,V> UpdateResult<K,V>
createSplit(TreeNode<K,V> newNode, TreeNode<K,V> extraNode, int sizeDelta)
           
 TreeNode<K,V> createTwoNode()
           
static
<K,V> UpdateResult<K,V>
createUnchanged()
           
 boolean equals(Object o)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

type

public final UpdateResult.Type type

newNode

public final TreeNode<K,V> newNode

extraNode

public final TreeNode<K,V> extraNode

sizeDelta

public final int sizeDelta
Method Detail

createUnchanged

public static <K,V> UpdateResult<K,V> createUnchanged()

createInPlace

public static <K,V> UpdateResult<K,V> createInPlace(TreeNode<K,V> newNode,
                                                    int sizeDelta)

createSplit

public static <K,V> UpdateResult<K,V> createSplit(TreeNode<K,V> newNode,
                                                  TreeNode<K,V> extraNode,
                                                  int sizeDelta)

createTwoNode

public TreeNode<K,V> createTwoNode()

createLeftTwoNode

public TreeNode<K,V> createLeftTwoNode(TreeNode<K,V> right,
                                       K rightMax)

createLeftThreeNode

public TreeNode<K,V> createLeftThreeNode(TreeNode<K,V> right,
                                         K rightMax)

createRightTwoNode

public TreeNode<K,V> createRightTwoNode(TreeNode<K,V> left,
                                        K leftMax)

createRightThreeNode

public TreeNode<K,V> createRightThreeNode(TreeNode<K,V> left,
                                          K leftMax)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014 Burton Computer Corporation. All rights reserved.