Package ghidra.generic.util.datastruct
Class TreeValueSortedMap.Node
- java.lang.Object
-
- ghidra.generic.util.datastruct.TreeValueSortedMap.Node
-
- All Implemented Interfaces:
java.util.Map.Entry<K,V>
- Enclosing class:
- TreeValueSortedMap<K,V>
protected class TreeValueSortedMap.Node extends java.lang.Object implements java.util.Map.Entry<K,V>An entry in the map. Nodes are elements of a binary tree and a doubly-linked list.
-
-
Field Summary
Fields Modifier and Type Field Description protected Kkeyprotected TreeValueSortedMap.NodelChildprotected TreeValueSortedMap.Nodenextprotected TreeValueSortedMap.Nodeparentprotected TreeValueSortedMap.Nodeprevprotected TreeValueSortedMap.NoderChildprotected intsizeLeftprotected Vval
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcomputeIndex()Compute this node's index.booleanequals(java.lang.Object obj)KgetKey()VgetValue()inthashCode()VsetValue(V value)java.lang.StringtoString()
-
-
-
Field Detail
-
key
protected final K key
-
val
protected V val
-
parent
protected TreeValueSortedMap.Node parent
-
lChild
protected TreeValueSortedMap.Node lChild
-
rChild
protected TreeValueSortedMap.Node rChild
-
sizeLeft
protected int sizeLeft
-
next
protected TreeValueSortedMap.Node next
-
prev
protected TreeValueSortedMap.Node prev
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
-
hashCode
public int hashCode()
-
computeIndex
public int computeIndex()
Compute this node's index. This uses thesizeLeftfield to compute the index in O(log n) on average.- Returns:
- the index
-
-