Package org.apache.hadoop.hbase.util
Class AvlUtil.AvlTreeIterator<TNode extends AvlUtil.AvlNode>
java.lang.Object
org.apache.hadoop.hbase.util.AvlUtil.AvlTreeIterator<TNode>
- All Implemented Interfaces:
Iterator<TNode>
- Enclosing class:
- AvlUtil
@Private
public static class AvlUtil.AvlTreeIterator<TNode extends AvlUtil.AvlNode>
extends Object
implements Iterator<TNode>
Iterator for the AvlTree
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAvlTreeIterator
(TNode root) Create the iterator starting from the first (min) node of the treeAvlTreeIterator
(TNode root, Object key, AvlUtil.AvlKeyComparator<TNode> keyComparator) Create the iterator starting from the specified key -
Method Summary
Modifier and TypeMethodDescriptionboolean
hasNext()
next()
void
remove()
void
Reset the iterator, and seeks to the first (min) node of the treeprivate void
seekNext()
void
seekTo
(TNode root, Object key, AvlUtil.AvlKeyComparator<TNode> keyComparator) Reset the iterator, and seeks to the specified keyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
stack
-
current
-
height
-
-
Constructor Details
-
AvlTreeIterator
public AvlTreeIterator() -
AvlTreeIterator
Create the iterator starting from the first (min) node of the tree- Parameters:
root
- the current root of the tree
-
AvlTreeIterator
Create the iterator starting from the specified key- Parameters:
root
- the current root of the treekey
- the key for the node we are trying to findkeyComparator
- the comparator to use to match node and key
-
-
Method Details
-
hasNext
- Specified by:
hasNext
in interfaceIterator<TNode extends AvlUtil.AvlNode>
-
next
- Specified by:
next
in interfaceIterator<TNode extends AvlUtil.AvlNode>
-
remove
- Specified by:
remove
in interfaceIterator<TNode extends AvlUtil.AvlNode>
-
seekFirst
Reset the iterator, and seeks to the first (min) node of the tree- Parameters:
root
- the current root of the tree
-
seekTo
Reset the iterator, and seeks to the specified key- Parameters:
root
- the current root of the treekey
- the key for the node we are trying to findkeyComparator
- the comparator to use to match node and key
-
seekNext
-