public class BasicIterablePosting extends BasicPostingImpl implements IterablePosting
| Modifier and Type | Field and Description |
|---|---|
protected BitIn |
bitFileReader |
protected DocumentIndex |
doi |
protected int |
numEntries |
dl, id, tfEND_OF_LIST, EOL| Constructor and Description |
|---|
BasicIterablePosting()
Empty constructor used ONLY for reflection
|
BasicIterablePosting(BitIn _bitFileReader,
int _numEntries,
DocumentIndex _doi)
Constructor
|
| 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.
|
String |
toString()
Makes a human readable form of this posting
|
getFrequency, getId, readFields, setDocumentLength, setId, setTf, writeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFrequency, getId, setIdprotected int numEntries
protected BitIn bitFileReader
protected DocumentIndex doi
public BasicIterablePosting()
public BasicIterablePosting(BitIn _bitFileReader, int _numEntries, DocumentIndex _doi) throws IOException
_bitFileReader - The bit file where we read the postings from_numEntries - Total number of postings to read before returning EOL_doi - The document index to get the doc length of the current docidIOExceptionpublic boolean endOfPostings()
IterablePostingendOfPostings in interface IterablePostingpublic int getDocumentLength()
BasicPostingImplgetDocumentLength in interface PostinggetDocumentLength in class BasicPostingImplpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic WritablePosting asWritablePosting()
BasicPostingImplasWritablePosting in interface PostingasWritablePosting in class BasicPostingImplpublic String toString()
BasicPostingImpltoString in class BasicPostingImplpublic int next()
throws IOException
IterablePostingnext in interface IterablePostingIOExceptionpublic int next(int target)
throws IOException
IterablePostingnext in interface IterablePostingtarget - id of the posting to find in this posting list.IOExceptionTerrier Information Retrieval Platform 5.1. Copyright © 2004-2019, University of Glasgow