Package org.terrier.indexing
Class CollectionDocumentList
- java.lang.Object
-
- org.terrier.indexing.CollectionDocumentList
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,Collection
public class CollectionDocumentList extends java.lang.Object implements Collection
-
-
Constructor Summary
Constructors Constructor Description CollectionDocumentList(Document[] _docs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
endOfCollection()
Returns true if the end of the collection has been reachedDocument
getDocument()
Get the document object representing the current document.boolean
nextDocument()
Move the collection to the start of the next document.void
reset()
Resets the Collection iterator to the start of the collection.
-
-
-
Constructor Detail
-
CollectionDocumentList
public CollectionDocumentList(Document[] _docs)
-
-
Method Detail
-
endOfCollection
public boolean endOfCollection()
Description copied from interface:Collection
Returns true if the end of the collection has been reached- Specified by:
endOfCollection
in interfaceCollection
- Returns:
- boolean true if the end of collection has been reached, otherwise it returns false.
-
getDocument
public Document getDocument()
Description copied from interface:Collection
Get the document object representing the current document.- Specified by:
getDocument
in interfaceCollection
- Returns:
- Document the current document;
-
nextDocument
public boolean nextDocument()
Description copied from interface:Collection
Move the collection to the start of the next document.- Specified by:
nextDocument
in interfaceCollection
- Returns:
- boolean true if there exists another document in the collection, otherwise it returns false.
-
reset
public void reset()
Description copied from interface:Collection
Resets the Collection iterator to the start of the collection.- Specified by:
reset
in interfaceCollection
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-