Interface LLRBNode<K,V> (3.30.0)

public interface LLRBNode<K,V>

Type Parameters

Name Description
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
Name Description
key K
value V
color LLRBNode.Color
left LLRBNode<K,V>
right LLRBNode<K,V>
Returns
Type Description
LLRBNode<K,V>

getKey()

public abstract K getKey()
Returns
Type Description
K

getLeft()

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

getMax()

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

getMin()

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

getRight()

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

getValue()

public abstract V getValue()
Returns
Type Description
V

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

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

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

public abstract LLRBNode<K,V> insert(K key, V value, Comparator<K> comparator)
Parameters
Name Description
key K
value V
comparator Comparator<K>
Returns
Type Description
LLRBNode<K,V>

isEmpty()

public abstract boolean isEmpty()
Returns
Type Description
boolean

isRed()

public abstract boolean isRed()
Returns
Type Description
boolean

remove(K key, Comparator<K> comparator)

public abstract LLRBNode<K,V> remove(K key, Comparator<K> comparator)
Parameters
Name Description
key K
comparator Comparator<K>
Returns
Type Description
LLRBNode<K,V>

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

public abstract boolean shortCircuitingInOrderTraversal(LLRBNode.ShortCircuitingNodeVisitor<K,V> visitor)
Parameter
Name Description
visitor ShortCircuitingNodeVisitor<K,V>
Returns
Type Description
boolean

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

public abstract boolean shortCircuitingReverseOrderTraversal(LLRBNode.ShortCircuitingNodeVisitor<K,V> visitor)
Parameter
Name Description
visitor ShortCircuitingNodeVisitor<K,V>
Returns
Type Description
boolean

size()

public abstract int size()
Returns
Type Description
int