title: How to stream through a Set<Set<Integer>> and put it into a HashMap as the value?
body: <p>I have a Set Set:</p>
  <pre><code>Set&lt;Set&lt;Integer&gt;&gt; nestedSet = Set.of(Set.of(1, 9), Set.of(0,2,4), Set.of(14,1), Set.of(2,23,13), Set.of(14,22));
  </code></pre>
  <p>What i want to archive, is to stream through the nestedSet in chronology order (i know that a Set is not in chronological order, should i use a LinkedHashSet instead?) and put each of the Sets into the Hashmap as the value. The key of the Hashmap should be a index starting with 0.
  Something like this:</p>
  <pre><code>HashMap&lt;Integer,Set&lt;Integer&gt;&gt; hashMap = new HashMap&lt;&gt;();
  for ( int i = 0; i &lt; nestedSet.size; i++){
   nestedSet.stream();
   hashMap.put(i, firstSet);
  }
  </code></pre>
  <p>And the output should be:</p>
  <pre><code>System.out.printl(hashMap);
  {0=[1,9],1=[0,2,4],2=[14,1],3=[2,23,13],4=[14,22]} 
  </code></pre>