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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAvlTreeIterator(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 TypeMethodDescriptionbooleanhasNext()next()voidremove()voidReset the iterator, and seeks to the first (min) node of the treeprivate voidseekNext()voidseekTo(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, waitMethods 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:
hasNextin interfaceIterator<TNode extends AvlUtil.AvlNode>
-
next
- Specified by:
nextin interfaceIterator<TNode extends AvlUtil.AvlNode>
-
remove
- Specified by:
removein 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
-