Package org.terrier.structures
Class FSOMapFileLexiconGeneric.MapFileLexiconIterator<T1,T2 extends org.apache.hadoop.io.WritableComparable<?>>
- java.lang.Object
-
- org.terrier.structures.FSOMapFileLexiconGeneric.MapFileLexiconIterator<T1,T2>
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.util.Iterator<java.util.Map.Entry<java.lang.String,LexiconEntry>>
- Direct Known Subclasses:
FSOMapFileLexicon.MapFileLexiconIterator
- Enclosing class:
- FSOMapFileLexiconGeneric<K1,K2 extends org.apache.hadoop.io.WritableComparable>
public abstract static class FSOMapFileLexiconGeneric.MapFileLexiconIterator<T1,T2 extends org.apache.hadoop.io.WritableComparable<?>> extends java.lang.Object implements java.util.Iterator<java.util.Map.Entry<java.lang.String,LexiconEntry>>, java.io.Closeable
An iterator over the lexicon
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Iterator<java.util.Map.Entry<T2,LexiconEntry>>
parent
-
Constructor Summary
Constructors Constructor Description MapFileLexiconIterator(java.lang.String structureName, java.lang.String path, java.lang.String prefix, FixedSizeWriteableFactory<T2> keyFactory, FixedSizeWriteableFactory<LexiconEntry> valueFactory)
Construct an instance of the class withMapFileLexiconIterator(java.lang.String structureName, IndexOnDisk index)
Construct an instance of the class withMapFileLexiconIterator(java.lang.String filename, FixedSizeWriteableFactory<T2> keyFactory, FixedSizeWriteableFactory<LexiconEntry> valueFactory)
Construct an instance of the class withMapFileLexiconIterator(java.util.Iterator<java.util.Map.Entry<T2,LexiconEntry>> _parent)
Construct an instance of the class with
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
hasNext()
void
remove()
-
-
-
Field Detail
-
parent
protected java.util.Iterator<java.util.Map.Entry<T2 extends org.apache.hadoop.io.WritableComparable<?>,LexiconEntry>> parent
-
-
Constructor Detail
-
MapFileLexiconIterator
public MapFileLexiconIterator(java.lang.String structureName, IndexOnDisk index) throws java.io.IOException
Construct an instance of the class with- Parameters:
structureName
-index
-- Throws:
java.io.IOException
-
MapFileLexiconIterator
public MapFileLexiconIterator(java.lang.String structureName, java.lang.String path, java.lang.String prefix, FixedSizeWriteableFactory<T2> 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
-
MapFileLexiconIterator
public MapFileLexiconIterator(java.lang.String filename, FixedSizeWriteableFactory<T2> keyFactory, FixedSizeWriteableFactory<LexiconEntry> valueFactory) throws java.io.IOException
Construct an instance of the class with- Parameters:
filename
-keyFactory
-valueFactory
-- Throws:
java.io.IOException
-
MapFileLexiconIterator
public MapFileLexiconIterator(java.util.Iterator<java.util.Map.Entry<T2,LexiconEntry>> _parent)
Construct an instance of the class with- Parameters:
_parent
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<T1>
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<T1>
-
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
-
-