org.terrier.structures.postings
Interface IterablePosting

All Superinterfaces:
java.io.Closeable, Posting
All Known Implementing Classes:
ArrayOfBasicIterablePosting, ArrayOfIdsIterablePosting, BasicIterablePosting, BasicIterablePostingDocidOnly, BlockFieldIterablePosting, BlockFieldORIterablePosting, BlockFieldPostingInRun.bfPIRPostingIterator, BlockIterablePosting, BlockORIterablePosting, BlockPostingInRun.BlockPIRPostingIterator, DocumentPostingList.postingIterator, FieldIterablePosting, FieldORIterablePosting, FieldPostingInRun.fPIRPostingIterator, IterablePostingImpl, ORIterablePosting, SimplePostingInRun.PIRPostingIterator

public interface IterablePosting
extends Posting, java.io.Closeable

An interface that allows a list of postings to be iterated over

Since:
3.0
Author:
Craig Macdonald, Nicola Tonnellotto

Field Summary
static int EOL
          Value which denotes that the end of the posting list has been reached
 
Method Summary
 boolean endOfPostings()
          Status method to see if this posting list iterator has been finished
 int next()
          Move this iterator to the next posting.
 int next(int targetId)
          Move this iterator to the posting with specified id, or next posting after that.
 
Methods inherited from interface org.terrier.structures.postings.Posting
asWritablePosting, getDocumentLength, getFrequency, getId, setId
 
Methods inherited from interface java.io.Closeable
close
 

Field Detail

EOL

static final int EOL
Value which denotes that the end of the posting list has been reached

See Also:
Constant Field Values
Method Detail

next

int next()
         throws java.io.IOException
Move this iterator to the next posting.

Returns:
id of next posting, or EOL if end of posting list
Throws:
java.io.IOException

next

int next(int targetId)
         throws java.io.IOException
Move this iterator to the posting with specified id, or next posting after that. This is usually implemented internally by next(), but more efficient implementations can override this behaviour.

Parameters:
targetId - 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

endOfPostings

boolean endOfPostings()
Status method to see if this posting list iterator has been finished

Returns:
true if next() or next(int) would return EOL or have returned EOL.


Terrier 3.5. Copyright © 2004-2011 University of Glasgow