sbrt.shell.io
Class SmoFileSource<K,V>

java.lang.Object
  extended by sbrt.shell.io.SmoFileSource<K,V>
Type Parameters:
K - the key type.
V - the value type.
All Implemented Interfaces:
java.util.Iterator<SmoFile<K,V>>

public class SmoFileSource<K,V>
extends java.lang.Object
implements java.util.Iterator<SmoFile<K,V>>

This class is used to provided a source of serialized map output files.

Author:
This class was written and documented by Jeremiah Wright while in the Wagner lab.

Constructor Summary
SmoFileSource(java.util.Iterator<java.lang.String> fileNameSource, FileFormat fileFormat, java.util.Set<? extends K> keys)
          Constructs a new source of serialized map output files.
 
Method Summary
 FileFormat getFileFormat()
          Returns the format used to create files of type SmoFile.
 boolean hasNext()
          Indicates if this iterator can return another file using the next() method .
 SmoFile<K,V> next()
          Returns the next column-oriented map output file with the next name returned by the file name source.
 void remove()
          Throws UnsupportedOperationException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmoFileSource

public SmoFileSource(java.util.Iterator<java.lang.String> fileNameSource,
                     FileFormat fileFormat,
                     java.util.Set<? extends K> keys)
Constructs a new source of serialized map output files.

Parameters:
fileNameSource - the file name source.
fileFormat - the file format used to write files.
keys - the keys whose values will be written to the files produced by this source. null is not allowed.
Throws:
java.lang.NullPointerException - if any argument is null.
Method Detail

getFileFormat

public FileFormat getFileFormat()
Returns the format used to create files of type SmoFile.

Returns:
the format used to create files of type SmoFile.

hasNext

public boolean hasNext()
Indicates if this iterator can return another file using the next() method .

Specified by:
hasNext in interface java.util.Iterator<SmoFile<K,V>>
Returns:
true if this iterator can return another file; false otherwise.

next

public SmoFile<K,V> next()
Returns the next column-oriented map output file with the next name returned by the file name source.

Specified by:
next in interface java.util.Iterator<SmoFile<K,V>>
Returns:
the next column-oriented map output file.

remove

public void remove()
Throws UnsupportedOperationException.

Specified by:
remove in interface java.util.Iterator<SmoFile<K,V>>
Throws:
java.lang.UnsupportedOperationException