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 voidclose()booleanendOfCollection()Returns true if the end of the collection has been reachedDocumentgetDocument()Get the document object representing the current document.booleannextDocument()Move the collection to the start of the next document.voidreset()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:CollectionReturns true if the end of the collection has been reached- Specified by:
endOfCollectionin interfaceCollection- Returns:
- boolean true if the end of collection has been reached, otherwise it returns false.
-
getDocument
public Document getDocument()
Description copied from interface:CollectionGet the document object representing the current document.- Specified by:
getDocumentin interfaceCollection- Returns:
- Document the current document;
-
nextDocument
public boolean nextDocument()
Description copied from interface:CollectionMove the collection to the start of the next document.- Specified by:
nextDocumentin interfaceCollection- Returns:
- boolean true if there exists another document in the collection, otherwise it returns false.
-
reset
public void reset()
Description copied from interface:CollectionResets the Collection iterator to the start of the collection.- Specified by:
resetin interfaceCollection
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-