title: Iterating over unique pairs in a HashSet (Java)
body: <p>I want to iterate over unique pairs in a HashSet, Ideally, I'd be able to make a copy of the iterator and when it has exhausted itself, iterate the iterator I am making copies of, but Iterators do not like being copied, and I suspect that there is a good reason for this, but I do not know what that is. </p>
  
  <p>More specifically, what prevents this (below) behavior from being supported?</p>
  
  <pre><code>Iterator&lt;Object&gt; iter = myhash.iterator();
  while(iter.hasNext()){
      object=iter.next();
      Iterator&lt;Object&gt; iterclone = iter.clone();
      while(iterclone.hasNext()){
          setOfObjectPairs.add(object,iterclone.next());
      }
  }
  </code></pre>
  
  <p>Edit: The point of doing this is to save the current state of the iterator, which is already pointing at the i-th element.</p>