Package org.terrier.structures
Class FSOMapFileLexiconGeneric.MapFileLexiconEntryIterator<T extends org.apache.hadoop.io.WritableComparable<?>>
- java.lang.Object
-
- org.terrier.structures.FSOMapFileLexiconGeneric.MapFileLexiconEntryIterator<T>
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.util.Iterator<LexiconEntry>
,Skipable
- Direct Known Subclasses:
FSOMapFileLexicon.MapFileLexiconEntryIterator
- Enclosing class:
- FSOMapFileLexiconGeneric<K1,K2 extends org.apache.hadoop.io.WritableComparable>
public static class FSOMapFileLexiconGeneric.MapFileLexiconEntryIterator<T extends org.apache.hadoop.io.WritableComparable<?>> extends java.lang.Object implements java.util.Iterator<LexiconEntry>, java.io.Closeable, Skipable
Iterate through the values in order
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Iterator<java.util.Map.Entry<T,LexiconEntry>>
internalIterator
-
Constructor Summary
Constructors Constructor Description MapFileLexiconEntryIterator(java.lang.String structureName, java.lang.String path, java.lang.String prefix, FixedSizeWriteableFactory<T> keyFactory, FixedSizeWriteableFactory<LexiconEntry> valueFactory)
Construct an instance of the class withMapFileLexiconEntryIterator(java.lang.String structureName, IndexOnDisk index)
Construct an instance of the class withMapFileLexiconEntryIterator(java.lang.String filename, FixedSizeWriteableFactory<T> keyFactory, FixedSizeWriteableFactory<LexiconEntry> valueFactory)
Construct an instance of the class withMapFileLexiconEntryIterator(java.util.Iterator<java.util.Map.Entry<T,LexiconEntry>> _internalIterator)
Construct an instance of the class with
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
hasNext()
LexiconEntry
next()
void
remove()
void
skip(int numEntries)
-
-
-
Field Detail
-
internalIterator
protected java.util.Iterator<java.util.Map.Entry<T extends org.apache.hadoop.io.WritableComparable<?>,LexiconEntry>> internalIterator
-
-
Constructor Detail
-
MapFileLexiconEntryIterator
public MapFileLexiconEntryIterator(java.lang.String structureName, IndexOnDisk index) throws java.io.IOException
Construct an instance of the class with- Parameters:
structureName
-index
-- Throws:
java.io.IOException
-
MapFileLexiconEntryIterator
public MapFileLexiconEntryIterator(java.lang.String structureName, java.lang.String path, java.lang.String prefix, FixedSizeWriteableFactory<T> 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
-
MapFileLexiconEntryIterator
public MapFileLexiconEntryIterator(java.lang.String filename, FixedSizeWriteableFactory<T> keyFactory, FixedSizeWriteableFactory<LexiconEntry> valueFactory) throws java.io.IOException
Construct an instance of the class with- Parameters:
filename
-keyFactory
-valueFactory
-- Throws:
java.io.IOException
-
MapFileLexiconEntryIterator
public MapFileLexiconEntryIterator(java.util.Iterator<java.util.Map.Entry<T,LexiconEntry>> _internalIterator)
Construct an instance of the class with- Parameters:
_internalIterator
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<T extends org.apache.hadoop.io.WritableComparable<?>>
-
next
public LexiconEntry next()
- Specified by:
next
in interfacejava.util.Iterator<T extends org.apache.hadoop.io.WritableComparable<?>>
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<T extends org.apache.hadoop.io.WritableComparable<?>>
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-