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 int
counter
protected java.io.DataInput
di
protected FixedSizeWriteableFactory<IK>
keyFactory
protected int
numEntries
protected 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 void
close()
boolean
hasNext()
java.util.Map.Entry<IK,IV>
next()
void
remove()
void
skip(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.IOException
constructor- Parameters:
filename
-_keyFactory
-_valueFactory
-- Throws:
java.io.IOException
-
-
Method Detail
-
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
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<IK extends org.apache.hadoop.io.Writable>
-
next
public java.util.Map.Entry<IK,IV> next()
- Specified by:
next
in interfacejava.util.Iterator<IK extends org.apache.hadoop.io.Writable>
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<IK extends org.apache.hadoop.io.Writable>
-
-