title: Collect all objects from a Set of Sets with Java Stream
body: <p>I'm trying to learn Java Streams and trying to get a <code>HashSet&lt;Person&gt;</code> from a <code>HashSet&lt;SortedSet&lt;Person&gt;&gt;</code>. </p>
  
  <pre><code>HashSet&lt;Person&gt; students = getAllStudents();
  HashSet&lt;SortedSet&lt;Person&gt;&gt; teachersForStudents = students.stream().map(Person::getTeachers).collect(Collectors.toCollection(HashSet::new));
  HashSet&lt;Person&gt; = //combine teachers and students in one HashSet
  </code></pre>
  
  <p>What I really want it to combine all teachers and all students in one <code>HashSet&lt;Person&gt;</code>. I guess I'm doing something wrong when I'm collecting my stream?</p>