Class LLRBEmptyNode<K,V> (3.22.0)

public class LLRBEmptyNode<K,V> implements LLRBNode<K,V>

Inheritance

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

Implements

LLRBNode<K,V>

Type Parameters

Name Description
K
V

Static Methods

<K,V>getInstance()

public static LLRBEmptyNode<K,V> <K,V>getInstance()
Returns
Type Description
LLRBEmptyNode<K,V>

Methods

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

public 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 K getKey()
Returns
Type Description
K

getLeft()

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

getMax()

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

getMin()

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

getRight()

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

getValue()

public V getValue()
Returns
Type Description
V

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

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

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

public 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 boolean isEmpty()
Returns
Type Description
boolean

isRed()

public boolean isRed()
Returns
Type Description
boolean

remove(K key, Comparator<K> comparator)

public 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 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 boolean shortCircuitingReverseOrderTraversal(LLRBNode.ShortCircuitingNodeVisitor<K,V> visitor)
Parameter
Name Description
visitor ShortCircuitingNodeVisitor<K,V>
Returns
Type Description
boolean

size()

public int size()
Returns
Type Description
int