public class BasicIterablePosting extends BasicPostingImpl implements IterablePosting
| Modifier and Type | Field and Description | 
|---|---|
| protected BitIn | bitFileReader | 
| protected DocumentIndex | doi | 
| protected int | numEntries | 
dl, id, tfEOL| Modifier | Constructor and Description | 
|---|---|
| protected  | BasicIterablePosting()Create a new posting iterator | 
|   | BasicIterablePosting(BitIn _bitFileReader,
                    int _numEntries,
                    DocumentIndex _doi)Create a new posting iterator | 
| Modifier and Type | Method and Description | 
|---|---|
| WritablePosting | asWritablePosting()Copies this posting to one free of an iterator. | 
| void | close() | 
| boolean | endOfPostings()Status method to see if this posting list iterator has been finished | 
| int | getDocumentLength()Returns 0 | 
| int | next()Move this iterator to the next posting. | 
| int | next(int target)Move this iterator to the posting with specified id, or next posting after that. | 
getFrequency, getId, readFields, setDocumentLength, setId, setTf, toString, writeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFrequency, getId, setIdprotected int numEntries
protected BitIn bitFileReader
protected DocumentIndex doi
protected BasicIterablePosting()
public BasicIterablePosting(BitIn _bitFileReader, int _numEntries, DocumentIndex _doi) throws IOException
_bitFileReader - BitIn to read the postings from_numEntries - number of postings in the list_doi - document index to use to satisfy getDocumentLength()IOException - thrown in an IO exception occurspublic int next()
         throws IOException
next in interface IterablePostingIOExceptionpublic int next(int target)
         throws IOException
next in interface IterablePostingtarget - id of the posting to find in this postingn list.IOExceptionpublic boolean endOfPostings()
endOfPostings in interface IterablePostingpublic int getDocumentLength()
getDocumentLength in interface PostinggetDocumentLength in class BasicPostingImplpublic void close()
           throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic WritablePosting asWritablePosting()
asWritablePosting in interface PostingasWritablePosting in class BasicPostingImplTerrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow