Interface LLRBNode<K,V> (3.4.1)

public interface 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 abstract LLRBNode<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
LLRBNode<K,V>

getKey()

public abstract K getKey()
Returns
TypeDescription
K

getLeft()

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

getMax()

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

getMin()

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

getRight()

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

getValue()

public abstract V getValue()
Returns
TypeDescription
V

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

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

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

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

isEmpty()

public abstract boolean isEmpty()
Returns
TypeDescription
boolean

isRed()

public abstract boolean isRed()
Returns
TypeDescription
boolean

remove(K key, Comparator<K> comparator)

public abstract 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 abstract boolean shortCircuitingInOrderTraversal(LLRBNode.ShortCircuitingNodeVisitor<K,V> visitor)
Parameter
NameDescription
visitorShortCircuitingNodeVisitor<K,V>
Returns
TypeDescription
boolean

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

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

size()

public abstract int size()
Returns
TypeDescription
int