org.terrier.structures
Class FSOMapFileLexicon.MapFileLexiconEntryIterator

java.lang.Object
  extended by org.terrier.structures.FSOMapFileLexicon.MapFileLexiconEntryIterator
All Implemented Interfaces:
Closeable, Iterator<LexiconEntry>, Skipable
Enclosing class:
FSOMapFileLexicon

public static class FSOMapFileLexicon.MapFileLexiconEntryIterator
extends Object
implements Iterator<LexiconEntry>, Closeable, Skipable

Iterate through the values in order


Field Summary
protected  Iterator<Map.Entry<org.apache.hadoop.io.Text,LexiconEntry>> internalIterator
           
 
Constructor Summary
FSOMapFileLexicon.MapFileLexiconEntryIterator(Iterator<Map.Entry<org.apache.hadoop.io.Text,LexiconEntry>> _internalIterator)
          Construct an instance of the class with
FSOMapFileLexicon.MapFileLexiconEntryIterator(String filename, FixedSizeWriteableFactory<org.apache.hadoop.io.Text> keyFactory, FixedSizeWriteableFactory<LexiconEntry> valueFactory)
          Construct an instance of the class with
FSOMapFileLexicon.MapFileLexiconEntryIterator(String structureName, Index index)
          Construct an instance of the class with
FSOMapFileLexicon.MapFileLexiconEntryIterator(String structureName, String path, String prefix, FixedSizeWriteableFactory<org.apache.hadoop.io.Text> keyFactory, FixedSizeWriteableFactory<LexiconEntry> valueFactory)
          Construct an instance of the class with
 
Method Summary
 void close()
          
 boolean hasNext()
          
 LexiconEntry 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
 

Field Detail

internalIterator

protected Iterator<Map.Entry<org.apache.hadoop.io.Text,LexiconEntry>> internalIterator
Constructor Detail

FSOMapFileLexicon.MapFileLexiconEntryIterator

public FSOMapFileLexicon.MapFileLexiconEntryIterator(String structureName,
                                                     Index index)
                                              throws IOException
Construct an instance of the class with

Parameters:
structureName -
index -
Throws:
IOException

FSOMapFileLexicon.MapFileLexiconEntryIterator

public FSOMapFileLexicon.MapFileLexiconEntryIterator(String structureName,
                                                     String path,
                                                     String prefix,
                                                     FixedSizeWriteableFactory<org.apache.hadoop.io.Text> keyFactory,
                                                     FixedSizeWriteableFactory<LexiconEntry> valueFactory)
                                              throws IOException
Construct an instance of the class with

Parameters:
structureName -
path -
prefix -
keyFactory -
valueFactory -
Throws:
IOException

FSOMapFileLexicon.MapFileLexiconEntryIterator

public FSOMapFileLexicon.MapFileLexiconEntryIterator(String filename,
                                                     FixedSizeWriteableFactory<org.apache.hadoop.io.Text> keyFactory,
                                                     FixedSizeWriteableFactory<LexiconEntry> valueFactory)
                                              throws IOException
Construct an instance of the class with

Parameters:
filename -
keyFactory -
valueFactory -
Throws:
IOException

FSOMapFileLexicon.MapFileLexiconEntryIterator

public FSOMapFileLexicon.MapFileLexiconEntryIterator(Iterator<Map.Entry<org.apache.hadoop.io.Text,LexiconEntry>> _internalIterator)
Construct an instance of the class with

Parameters:
_internalIterator -
Method Detail

hasNext

public boolean hasNext()

Specified by:
hasNext in interface Iterator<LexiconEntry>

next

public LexiconEntry next()

Specified by:
next in interface Iterator<LexiconEntry>

remove

public void remove()

Specified by:
remove in interface Iterator<LexiconEntry>

close

public void close()
           throws IOException

Specified by:
close in interface Closeable
Throws:
IOException

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.


Terrier 3.6. Copyright © 2004-2011 University of Glasgow