public abstract class RunIterator extends Object implements Iterator<PostingInRun>, Closeable
Modifier and Type | Field and Description |
---|---|
protected int |
flushNo
Run/Flush that the current posting came from
|
protected int |
numberOfFields |
protected PostingInRun |
posting
current posting
|
protected Class<? extends PostingInRun> |
postingClass
class that new postings are derived from
|
Modifier | Constructor and Description |
---|---|
protected |
RunIterator(Class<? extends PostingInRun> _postingClass,
int _runNo,
int _numberOfFields)
create a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
close this RunIterator
|
protected void |
createPosting()
Create a new posting
|
PostingInRun |
current()
returns the current posting
|
int |
getRunNo()
Get the run/flush number that the current posting came from
|
abstract boolean |
hasNext()
iterator implementation
|
abstract PostingInRun |
next()
iterator implementation
|
void |
remove()
unsupported iterator method
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
protected Class<? extends PostingInRun> postingClass
protected PostingInRun posting
protected int flushNo
protected int numberOfFields
protected RunIterator(Class<? extends PostingInRun> _postingClass, int _runNo, int _numberOfFields)
_postingClass
- Class of the PostingInRun type that postings in this run have_runNo
- The run number currently being processedprotected void createPosting() throws Exception
Exception
public int getRunNo()
public abstract boolean hasNext()
hasNext
in interface Iterator<PostingInRun>
public abstract PostingInRun next()
next
in interface Iterator<PostingInRun>
public PostingInRun current()
public void remove()
remove
in interface Iterator<PostingInRun>
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Terrier Information Retrieval Platform 5.1. Copyright © 2004-2019, University of Glasgow