Class LLRBValueNode<K,V> (3.7.8)

public abstract class LLRBValueNode<K,V> implements LLRBNode<K,V>

Inheritance

java.lang.Object > LLRBValueNode<K,V>

Implements

LLRBNode<K,V>

Type Parameters

NameDescription
K
V

Methods

copy(K key, V value, LLRBNode.Color color, LLRBNode<K,V> left, LLRBNode<K,V> right)

public LLRBValueNode<K,V> copy(K key, V value, LLRBNode.Color color, LLRBNode<K,V> left, LLRBNode<K,V> right)
Parameters
NameDescription
keyK
valueV
colorLLRBNode.Color
leftLLRBNode<K,V>
rightLLRBNode<K,V>
Returns
TypeDescription
LLRBValueNode<K,V>

copy(K key, V value, LLRBNode<K,V> left, LLRBNode<K,V> right)

protected abstract LLRBValueNode<K,V> copy(K key, V value, LLRBNode<K,V> left, LLRBNode<K,V> right)
Parameters
NameDescription
keyK
valueV
leftLLRBNode<K,V>
rightLLRBNode<K,V>
Returns
TypeDescription
LLRBValueNode<K,V>

getColor()

protected abstract LLRBNode.Color getColor()
Returns
TypeDescription
LLRBNode.Color

getKey()

public K getKey()
Returns
TypeDescription
K

getLeft()

public LLRBNode<K,V> getLeft()
Returns
TypeDescription
LLRBNode<K,V>

getMax()

public LLRBNode<K,V> getMax()
Returns
TypeDescription
LLRBNode<K,V>

getMin()

public LLRBNode<K,V> getMin()
Returns
TypeDescription
LLRBNode<K,V>

getRight()

public LLRBNode<K,V> getRight()
Returns
TypeDescription
LLRBNode<K,V>

getValue()

public V getValue()
Returns
TypeDescription
V

inOrderTraversal(LLRBNode.NodeVisitor<K,V> visitor)

public void inOrderTraversal(LLRBNode.NodeVisitor<K,V> visitor)
Parameter
NameDescription
visitorNodeVisitor<K,V>

insert(K key, V value, Comparator<K> comparator)

public LLRBNode<K,V> insert(K key, V value, Comparator<K> comparator)
Parameters
NameDescription
keyK
valueV
comparatorComparator<K>
Returns
TypeDescription
LLRBNode<K,V>

isEmpty()

public boolean isEmpty()
Returns
TypeDescription
boolean

remove(K key, Comparator<K> comparator)

public LLRBNode<K,V> remove(K key, Comparator<K> comparator)
Parameters
NameDescription
keyK
comparatorComparator<K>
Returns
TypeDescription
LLRBNode<K,V>

shortCircuitingInOrderTraversal(LLRBNode.ShortCircuitingNodeVisitor<K,V> visitor)

public boolean shortCircuitingInOrderTraversal(LLRBNode.ShortCircuitingNodeVisitor<K,V> visitor)
Parameter
NameDescription
visitorShortCircuitingNodeVisitor<K,V>
Returns
TypeDescription
boolean

shortCircuitingReverseOrderTraversal(LLRBNode.ShortCircuitingNodeVisitor<K,V> visitor)

public boolean shortCircuitingReverseOrderTraversal(LLRBNode.ShortCircuitingNodeVisitor<K,V> visitor)
Parameter
NameDescription
visitorShortCircuitingNodeVisitor<K,V>
Returns
TypeDescription
boolean