|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DocumentIterator<DocType extends Document>
Abstract generic document set.
A repository document set is a collection of zero or more repository documents. Such a set is typically the result of a query performed on a repository.
Note: This requires Java 1.5 or later.
AbstractDocumentIterator
,
RepositoryReader
Field Summary | |
---|---|
static java.lang.String |
REV
|
Method Summary | |
---|---|
void |
close()
Close this document set iterator. |
boolean |
hasNext()
Determine if there are any more documents within the document set. |
DocType |
next()
Retrieve the next document within the document set. |
void |
remove()
Remove the current document from the document set. |
Field Detail |
---|
static final java.lang.String REV
Method Detail |
---|
void close()
Note that this method does not throw any exceptions.
Implementations may allow this method to be called more than once.
close
in interface java.io.Closeable
boolean hasNext()
hasNext
in interface java.util.Iterator<DocType extends Document>
java.io.IOException
- Thrown if an error occurred while accessing the document
iterator.DocType 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. Callers of this method should therefore call
the close() method for each document returned.
next
in interface java.util.Iterator<DocType extends Document>
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<DocType extends Document>
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 |