com.sun.labs.minion.indexer.dictionary
Interface LightIterator

All Known Implementing Classes:
DiskDictionary.LightDiskDictionaryIterator

public interface LightIterator

An interface for a lightweight iterator for a dictionary. The idea here is similar to the idea for the postings iterator: don't return an object from the next method, but provide accessors for the data that we want.


Method Summary
 QueryEntry getEntry()
          Gets the entire current entry.
 int getID()
          Gets the ID of the current entry.
 int getN()
          Gets the number of postings associated with the entry that the iterator is currently pointing at.
 java.lang.Object getName()
          Gets the name of the entry that the iterator is currently pointing at.
 boolean next()
          Advances the iterator to the next entry in the dictionary.
 

Method Detail

next

boolean next()
Advances the iterator to the next entry in the dictionary.

Returns:
true if there is such an entry, false otherwise.

getID

int getID()
Gets the ID of the current entry.


getName

java.lang.Object getName()
Gets the name of the entry that the iterator is currently pointing at.

Returns:
the name of the current entry.

getN

int getN()
Gets the number of postings associated with the entry that the iterator is currently pointing at.

Returns:
the number of postings associated with the current entry.

getEntry

QueryEntry getEntry()
Gets the entire current entry.

Returns:
the current entry.