Skip to content

Instantly share code, notes, and snippets.

@okram
Created March 17, 2013 15:42
Show Gist options
  • Save okram/5182098 to your computer and use it in GitHub Desktop.
Save okram/5182098 to your computer and use it in GitHub Desktop.
if (!this.starts.hasNext()) {
for (final Map.Entry<K, Iterator<V>> entry : byMap.entrySet()) {
V2 previousReduceValue = this.reduceMap.get(entry.getKey());
if (null == previousReduceValue)
this.reduceMap.put(entry.getKey(), reduceFunction.compute(entry.getValue()));
else
this.reduceMap.put(entry.getKey(), reduceFunction.compute(new MultiIterator(entry.getValue(), new SingleIterator(previousReduceValue))));
}
this.byMap.clear();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment