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
|
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()
close
in interface Closeable
close
in interface AutoCloseable
Terrier 4.0. Copyright © 2004-2014 University of Glasgow