Package ghidra.generic.util.datastruct
Class TreeValueSortedMap.Node
java.lang.Object
ghidra.generic.util.datastruct.TreeValueSortedMap.Node
- All Implemented Interfaces:
Map.Entry<K,
V>
- Enclosing class:
TreeValueSortedMap<K,
V>
An entry in the map.
Nodes are elements of a binary tree and a doubly-linked list.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final K
protected TreeValueSortedMap<K,
V>.Node protected TreeValueSortedMap<K,
V>.Node protected TreeValueSortedMap<K,
V>.Node protected TreeValueSortedMap<K,
V>.Node protected TreeValueSortedMap<K,
V>.Node protected int
protected V
-
Constructor Summary
-
Method Summary
-
Field Details
-
key
-
val
-
parent
-
lChild
-
rChild
-
sizeLeft
protected int sizeLeft -
next
-
prev
-
-
Constructor Details
-
Node
Construct a new node- Parameters:
key
- the keyval
- the data
-
-
Method Details
-
toString
-
equals
-
hashCode
public int hashCode() -
computeIndex
public int computeIndex()Compute this node's index. This uses thesizeLeft
field to compute the index in O(log n) on average.- Returns:
- the index
-
getKey
-
getValue
-
setValue
-