public class HashDirectory.HDIterator extends FastIterator
| Modifier and Type | Field and Description |
|---|---|
private int |
_child
Current child position
|
private java.util.ArrayList |
_childStack |
private HashDirectory |
_dir
Current HashDirectory in the hierarchy
|
private java.util.ArrayList |
_dirStack
Stacks of directories & last enumerated child position
|
private java.util.Iterator |
_iter
Current bucket iterator
|
private boolean |
_iterateKeys
True if we're iterating on keys, False if enumerating on values.
|
| Constructor and Description |
|---|
HDIterator(boolean iterateKeys)
Construct an iterator on this directory.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
next()
Returns the next object.
|
private void |
prepareNext()
Prepare internal state so we can answer
hasMoreElements
Actually, this code prepares an Enumeration on the next
Bucket to enumerate. |
private boolean _iterateKeys
private java.util.ArrayList _dirStack
private java.util.ArrayList _childStack
private HashDirectory _dir
private int _child
private java.util.Iterator _iter
HDIterator(boolean iterateKeys)
throws java.io.IOException
iterateKeys - True if iteration supplies keys, False
if iterateKeys supplies values.java.io.IOExceptionpublic java.lang.Object next()
next in class FastIteratorprivate void prepareNext()
throws java.io.IOException
hasMoreElements
Actually, this code prepares an Enumeration on the next
Bucket to enumerate. If no following bucket is found,
the next Enumeration is set to null.java.io.IOException