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:
java.io.Closeable, java.util.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 java.lang.Object
implements java.util.Iterator<V>, java.io.Closeable, Skipable

ArrayFileIterator class


Constructor Summary
FSArrayFile.ArrayFileIterator(Index index, java.lang.String structureName)
          constructor
FSArrayFile.ArrayFileIterator(java.lang.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,
                                     java.lang.String structureName)
                              throws java.io.IOException
constructor

Parameters:
index -
structureName -
Throws:
java.io.IOException

FSArrayFile.ArrayFileIterator

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

Parameters:
filename -
_valueFactory -
Throws:
java.io.IOException
Method Detail

skip

public void skip(int numEntries)
          throws java.io.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:
java.io.IOException - if an IO problem occurs.

hasNext

public boolean hasNext()

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

next

public V next()

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

remove

public void remove()

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

close

public void close()

Specified by:
close in interface java.io.Closeable


Terrier 3.5. Copyright © 2004-2011 University of Glasgow