Terrier IR Platform
2.2.1

uk.ac.gla.terrier.structures.indexing.singlepass
Class RunIterator

java.lang.Object
  extended by uk.ac.gla.terrier.structures.indexing.singlepass.RunIterator
All Implemented Interfaces:
java.util.Iterator<PostingInRun>, Closeable
Direct Known Subclasses:
FileRunIterator, HadoopRunPostingIterator

public abstract class RunIterator
extends java.lang.Object
implements java.util.Iterator<PostingInRun>, Closeable

An abstract base class which allows PostingInRuns to be iterated over. Implementations are typically more generic versions of RunReader from Terrier 2.0 and 2.1.

Since:
2.2
Version:
$Revision: 1.4 $
Author:
Craig Macdonald

Method Summary
 void close()
          close this RunIterator
 PostingInRun current()
          returns the current posting
 int getRunNo()
          Get the run number that the current posting came from
abstract  boolean hasNext()
          iterator implementation
abstract  PostingInRun next()
          iterator implementation
 void remove()
          unsupported iterator method
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRunNo

public int getRunNo()
Get the run number that the current posting came from


hasNext

public abstract boolean hasNext()
iterator implementation

Specified by:
hasNext in interface java.util.Iterator<PostingInRun>

next

public abstract PostingInRun next()
iterator implementation

Specified by:
next in interface java.util.Iterator<PostingInRun>

current

public PostingInRun current()
returns the current posting


remove

public void remove()
unsupported iterator method

Specified by:
remove in interface java.util.Iterator<PostingInRun>

close

public void close()
close this RunIterator

Specified by:
close in interface Closeable

Terrier IR Platform
2.2.1

Terrier Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow