org.egothor.core
Interface IListReader

All Superinterfaces:
IListItem
All Known Implementing Classes:
CachedIListReader, ConcatListReader, ConcatLists, IListMetadataRead, IListRemapper, IListShadow, IListWasher, MemoryIList

public interface IListReader
extends IListItem

The IListReader interface represents an inverted list in read-only state. Here is some sample code for using such a reader:

 while (reader.next()) {
     do_what_you_like_with((IListItem) reader);
 }
 

Author:
Leo Galambos

Method Summary
 void close()
          Close the reader.
 long getPostings()
          Return the number of items in the inverted list this object reads (including removed ones).
 java.lang.String getTerm()
          Return the term that owns this inverted list.
 boolean next()
          Move to the next item in the inverted list.
 boolean skipTo(long uid)
          Skips (forward) in the inverted list to the first item with an ID greater than or equal to the given uid identification.
 
Methods inherited from interface org.egothor.core.IListItem
openProx, uid, weight
 

Method Detail

getTerm

java.lang.String getTerm()
Return the term that owns this inverted list.

Returns:
the term

next

boolean next()
Move to the next item in the inverted list.

Returns:
true if the next item exists

skipTo

boolean skipTo(long uid)
Skips (forward) in the inverted list to the first item with an ID greater than or equal to the given uid identification.

Parameters:
uid - the item to skip to
Returns:
true if the next item exists

close

void close()
Close the reader.


getPostings

long getPostings()
Return the number of items in the inverted list this object reads (including removed ones).

Returns:
the number of items