Class FSOrderedMapFile.EntryIterator<IK extends org.apache.hadoop.io.Writable,IV extends org.apache.hadoop.io.Writable>
- java.lang.Object
-
- org.terrier.structures.collections.FSOrderedMapFile.EntryIterator<IK,IV>
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.util.Iterator<java.util.Map.Entry<IK,IV>>,Skipable
- Enclosing class:
- FSOrderedMapFile<K extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable>
public static class FSOrderedMapFile.EntryIterator<IK extends org.apache.hadoop.io.Writable,IV extends org.apache.hadoop.io.Writable> extends java.lang.Object implements java.util.Iterator<java.util.Map.Entry<IK,IV>>, java.io.Closeable, Skipable
an iterator for entries.
-
-
Field Summary
Fields Modifier and Type Field Description protected intcounterprotected java.io.DataInputdiprotected FixedSizeWriteableFactory<IK>keyFactoryprotected intnumEntriesprotected FixedSizeWriteableFactory<IV>valueFactory
-
Constructor Summary
Constructors Constructor Description EntryIterator(java.lang.String filename, FixedSizeWriteableFactory<IK> _keyFactory, FixedSizeWriteableFactory<IV> _valueFactory)constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanhasNext()java.util.Map.Entry<IK,IV>next()voidremove()voidskip(int _numEntries)
-
-
-
Field Detail
-
di
protected java.io.DataInput di
-
numEntries
protected int numEntries
-
counter
protected int counter
-
keyFactory
protected FixedSizeWriteableFactory<IK extends org.apache.hadoop.io.Writable> keyFactory
-
valueFactory
protected FixedSizeWriteableFactory<IV extends org.apache.hadoop.io.Writable> valueFactory
-
-
Constructor Detail
-
EntryIterator
public EntryIterator(java.lang.String filename, FixedSizeWriteableFactory<IK> _keyFactory, FixedSizeWriteableFactory<IV> _valueFactory) throws java.io.IOExceptionconstructor- Parameters:
filename-_keyFactory-_valueFactory-- Throws:
java.io.IOException
-
-
Method Detail
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<IK extends org.apache.hadoop.io.Writable>
-
next
public java.util.Map.Entry<IK,IV> next()
- Specified by:
nextin interfacejava.util.Iterator<IK extends org.apache.hadoop.io.Writable>
-
remove
public void remove()
- Specified by:
removein interfacejava.util.Iterator<IK extends org.apache.hadoop.io.Writable>
-
-