it.unimi.di.mg4j.index
Class AbstractIndexReader

java.lang.Object
  extended by it.unimi.di.mg4j.index.AbstractIndexReader
All Implemented Interfaces:
IndexReader, SafelyCloseable, Closeable
Direct Known Subclasses:
AbstractIndexClusterIndexReader, BitStreamHPIndexReader, BitStreamIndexReader, QuasiSuccinctIndexReader, RemoteIndexReader

public abstract class AbstractIndexReader
extends Object
implements IndexReader

An abstract, safely closeable implementation of an index reader.


Field Summary
protected  boolean closed
          Whether this reader has been closed.
 
Constructor Summary
AbstractIndexReader()
           
 
Method Summary
 void close()
           
protected  void finalize()
           
 IndexIterator nextIterator()
          Throws an UnsupportedOperationException.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.unimi.di.mg4j.index.IndexReader
documents, documents
 

Field Detail

closed

protected boolean closed
Whether this reader has been closed.

Constructor Detail

AbstractIndexReader

public AbstractIndexReader()
Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable

nextIterator

public IndexIterator nextIterator()
                           throws IOException
Throws an UnsupportedOperationException.

Specified by:
nextIterator in interface IndexReader
Returns:
the index iterator of the next term, or null if there are no more terms after the current one.
Throws:
IOException