org.terrier.structures.postings
Class IterablePostingImpl

java.lang.Object
  extended by org.terrier.structures.postings.IterablePostingImpl
All Implemented Interfaces:
java.io.Closeable, IterablePosting, Posting
Direct Known Subclasses:
ArrayOfIdsIterablePosting, DocumentPostingList.postingIterator, ORIterablePosting, SimplePostingInRun.PIRPostingIterator

public abstract class IterablePostingImpl
extends java.lang.Object
implements IterablePosting

A base implementation of an IterablePosting, that provides a base implementation of next(int) method.

Since:
3.0
Author:
Craig Macdonald

Field Summary
 
Fields inherited from interface org.terrier.structures.postings.IterablePosting
EOL
 
Constructor Summary
IterablePostingImpl()
           
 
Method Summary
 int next(int target)
          This implementation of next(int) which uses next()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.terrier.structures.postings.IterablePosting
endOfPostings, next
 
Methods inherited from interface org.terrier.structures.postings.Posting
asWritablePosting, getDocumentLength, getFrequency, getId, setId
 
Methods inherited from interface java.io.Closeable
close
 

Constructor Detail

IterablePostingImpl

public IterablePostingImpl()
Method Detail

next

public int next(int target)
         throws java.io.IOException
This implementation of next(int) which uses next()

Specified by:
next in interface IterablePosting
Parameters:
target - id of the posting to find in this postingn list.
Returns:
id of the posting found, or EOL if end of posting list.
Throws:
java.io.IOException


Terrier 3.5. Copyright © 2004-2011 University of Glasgow