public class BasicIterablePosting extends BasicPostingImpl implements IterablePosting
Modifier and Type | Field and Description |
---|---|
protected BitIn |
bitFileReader |
protected DocumentIndex |
doi |
protected int |
numEntries |
dl, id, tf
EOL
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, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFrequency, getId, setId
protected 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 IterablePosting
IOException
public int next(int target) throws IOException
next
in interface IterablePosting
target
- id of the posting to find in this postingn list.IOException
public boolean endOfPostings()
endOfPostings
in interface IterablePosting
public int getDocumentLength()
getDocumentLength
in interface Posting
getDocumentLength
in class BasicPostingImpl
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public WritablePosting asWritablePosting()
asWritablePosting
in interface Posting
asWritablePosting
in class BasicPostingImpl
Terrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow