@InternalApi public abstract class LLRBValueNode<K,V> extends Object implements LLRBNode<K,V>
LLRBNode.Color, LLRBNode.NodeVisitor<K,V>, LLRBNode.ShortCircuitingNodeVisitor<K,V>
Modifier and Type | Method and Description |
---|---|
LLRBValueNode<K,V> |
copy(K key,
V value,
LLRBNode.Color color,
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) |
protected abstract LLRBNode.Color |
getColor() |
K |
getKey() |
LLRBNode<K,V> |
getLeft() |
LLRBNode<K,V> |
getMax() |
LLRBNode<K,V> |
getMin() |
LLRBNode<K,V> |
getRight() |
V |
getValue() |
void |
inOrderTraversal(LLRBNode.NodeVisitor<K,V> visitor) |
LLRBNode<K,V> |
insert(K key,
V value,
Comparator<K> comparator) |
boolean |
isEmpty() |
LLRBNode<K,V> |
remove(K key,
Comparator<K> comparator) |
boolean |
shortCircuitingInOrderTraversal(LLRBNode.ShortCircuitingNodeVisitor<K,V> visitor) |
boolean |
shortCircuitingReverseOrderTraversal(LLRBNode.ShortCircuitingNodeVisitor<K,V> visitor) |
protected abstract LLRBNode.Color getColor()
protected abstract LLRBValueNode<K,V> copy(K key, V value, 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)
public void inOrderTraversal(LLRBNode.NodeVisitor<K,V> visitor)
inOrderTraversal
in interface LLRBNode<K,V>
public boolean shortCircuitingInOrderTraversal(LLRBNode.ShortCircuitingNodeVisitor<K,V> visitor)
shortCircuitingInOrderTraversal
in interface LLRBNode<K,V>
public boolean shortCircuitingReverseOrderTraversal(LLRBNode.ShortCircuitingNodeVisitor<K,V> visitor)
shortCircuitingReverseOrderTraversal
in interface LLRBNode<K,V>
Copyright © 2023 Google LLC. All rights reserved.