|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tribble.archive.AbstractDocumentIterator
public class AbstractDocumentIterator
Abstract generic document set iterator.
An archive document set iterator is an iterator over a collection of archive documents. Such a set is typically the result of a query performed on an archive.
Note: This requires Java 1.5 or later.
AbstractDocumentSet
Field Summary | |
---|---|
protected int |
m_modCount
Modification serial number. |
protected int |
m_pos
Current document index within the set. |
protected AbstractDocumentSet |
m_set
Parent document set. |
Constructor Summary | |
---|---|
protected |
AbstractDocumentIterator(AbstractDocumentSet set)
Constructor. |
Method Summary | |
---|---|
boolean |
hasNext()
Determine if there are any more documents within the document set. |
AbstractDocument |
next()
Retrieve the next document within the document set. |
void |
remove()
Remove the current document from the document set. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected AbstractDocumentSet m_set
protected int m_pos
protected int m_modCount
Constructor Detail |
---|
protected AbstractDocumentIterator(AbstractDocumentSet set)
set
- Parent document set for which this iterator was created.Method Detail |
---|
public boolean hasNext()
hasNext
in interface java.util.Iterator<AbstractDocument>
java.io.IOException
- Thrown if an error occurred while accessing the document
iterator.public AbstractDocument next()
Note that this method also removes the previous document from the document
set, so calling remove()
is not necessary.
Note also that removed documents do not have their
close()
methods called, which could leave
them in an unstable state.
next
in interface java.util.Iterator<AbstractDocument>
public void remove() throws java.lang.UnsupportedOperationException, java.lang.IllegalStateException
Note that calling this method is not necessary, since next()
automatically removes each document it previously returned.
Note also that removed documents do not have their
close()
methods called, which could leave
them in an unstable state.
remove
in interface java.util.Iterator<AbstractDocument>
java.lang.UnsupportedOperationException
- (unchecked)
Thrown if this operation is not supported by this iterator.
java.lang.IllegalStateException
- (unchecked)
Thrown if next()
has not been called, or if remove()
has
already been called on the same item in the set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |