org.terrier.structures.collections
Class FSArrayFile.ArrayFileIterator<V extends org.apache.hadoop.io.Writable>

java.lang.Object
  extended by org.terrier.structures.collections.FSArrayFile.ArrayFileIterator<V>
Type Parameters:
V -
All Implemented Interfaces:
Closeable, Iterator<V>, Skipable
Direct Known Subclasses:
FSADocumentIndex.FSADocumentIndexIterator
Enclosing class:
FSArrayFile<V extends org.apache.hadoop.io.Writable>

public static class FSArrayFile.ArrayFileIterator<V extends org.apache.hadoop.io.Writable>
extends Object
implements Iterator<V>, Closeable, Skipable

ArrayFileIterator class


Constructor Summary
FSArrayFile.ArrayFileIterator(Index index, String structureName)
          constructor
FSArrayFile.ArrayFileIterator(String filename, FixedSizeWriteableFactory<V> _valueFactory)
          constructor
 
Method Summary
 void close()
          
 boolean hasNext()
          
 V next()
          
 void remove()
          
 void skip(int numEntries)
          Skip forward the specified number of entries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FSArrayFile.ArrayFileIterator

public FSArrayFile.ArrayFileIterator(Index index,
                                     String structureName)
                              throws IOException
constructor

Parameters:
index -
structureName -
Throws:
IOException

FSArrayFile.ArrayFileIterator

public FSArrayFile.ArrayFileIterator(String filename,
                                     FixedSizeWriteableFactory<V> _valueFactory)
                              throws IOException
constructor

Parameters:
filename -
_valueFactory -
Throws:
IOException
Method Detail

skip

public void skip(int numEntries)
          throws IOException
Skip forward the specified number of entries. Should be followed by a next() call.

Specified by:
skip in interface Skipable
Parameters:
numEntries - number of entries to skip
Throws:
IOException - if an IO problem occurs.

hasNext

public boolean hasNext()

Specified by:
hasNext in interface Iterator<V extends org.apache.hadoop.io.Writable>

next

public V next()

Specified by:
next in interface Iterator<V extends org.apache.hadoop.io.Writable>

remove

public void remove()

Specified by:
remove in interface Iterator<V extends org.apache.hadoop.io.Writable>

close

public void close()

Specified by:
close in interface Closeable


Terrier 3.6. Copyright © 2004-2011 University of Glasgow