org.terrier.structures
Class FSOMapFileLexicon.MapFileLexiconEntryIterator

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

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

Iterate through the values in order


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

FSOMapFileLexicon.MapFileLexiconEntryIterator

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

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

FSOMapFileLexicon.MapFileLexiconEntryIterator

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

Parameters:
structureName -
path -
prefix -
keyFactory -
valueFactory -
Throws:
java.io.IOException

FSOMapFileLexicon.MapFileLexiconEntryIterator

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

Parameters:
filename -
keyFactory -
valueFactory -
Throws:
java.io.IOException

FSOMapFileLexicon.MapFileLexiconEntryIterator

public FSOMapFileLexicon.MapFileLexiconEntryIterator(java.util.Iterator<java.util.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 java.util.Iterator<LexiconEntry>

next

public LexiconEntry next()

Specified by:
next in interface java.util.Iterator<LexiconEntry>

remove

public void remove()

Specified by:
remove in interface java.util.Iterator<LexiconEntry>

close

public void close()
           throws java.io.IOException

Specified by:
close in interface java.io.Closeable
Throws:
java.io.IOException

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.


Terrier 3.5. Copyright © 2004-2011 University of Glasgow