title: Iterate twice on values (MapReduce)
body: <p>I receive an iterator as argument and I would like to iterate on values twice.</p>
  
  <pre><code>public void reduce(Pair&lt;String,String&gt; key, Iterator&lt;IntWritable&gt; values,
                     Context context)
  </code></pre>
  
  <p>Is it possible ? How ?
  The signature is imposed by the framework I am using (namely Hadoop).</p>
  
  <p>-- edit --<br>
  Finally the real signature of the <code>reduce</code> method is with an <code>iterable</code>. I was misled by this <a href="http://wiki.apache.org/hadoop/WordCount" rel="noreferrer">wiki page</a> (which is actually the only non-deprecated (but wrong) example of wordcount I found).</p>