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 SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionAvlTreeIterator(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 SummaryModifier 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.IteratorforEachRemaining
- 
Field Details- 
stack
- 
current
- 
height
 
- 
- 
Constructor Details- 
AvlTreeIteratorpublic AvlTreeIterator()
- 
AvlTreeIteratorCreate the iterator starting from the first (min) node of the tree- Parameters:
- root- the current root of the tree
 
- 
AvlTreeIteratorCreate the iterator starting from the specified key- Parameters:
- root- the current root of the tree
- key- the key for the node we are trying to find
- keyComparator- the comparator to use to match node and key
 
 
- 
- 
Method Details- 
hasNext- Specified by:
- hasNextin interface- Iterator<TNode extends AvlUtil.AvlNode>
 
- 
next- Specified by:
- nextin interface- Iterator<TNode extends AvlUtil.AvlNode>
 
- 
remove- Specified by:
- removein interface- Iterator<TNode extends AvlUtil.AvlNode>
 
- 
seekFirstReset the iterator, and seeks to the first (min) node of the tree- Parameters:
- root- the current root of the tree
 
- 
seekToReset the iterator, and seeks to the specified key- Parameters:
- root- the current root of the tree
- key- the key for the node we are trying to find
- keyComparator- the comparator to use to match node and key
 
- 
seekNext
 
-