public class WmrIterator implements Iterator<String>, Iterable<String>
{
String myKey;
WmrIterator(String key);
public WmrIterator iterator();
public boolean hasNext();
public String next() throws NoSuchElementException;
public void remove() throws UnsupportedOperationException;
}
The WmrIterator class provides the list of values to the reducer, and is compatible with Java-style iterators.
public WmrIterator iterator()
Returns this WmrIterator when called.
public boolean hasNext()
Returns true
when there is at least one additional value contained in the list (standard input) managed by the iterator. Otherwise returns false
. If hasNext()
returns true
, it is safe to call the next()
method.
public String next()
Returns the next value in the list, if available. If there is no next value (as indicated by hasNext()
), a NoSuchElementException
is thrown.
public void remove()
This method is not implemented, and will throw an UnsupportedOperationException
if called.