title: Is there a way to convert steam.map() individual output to list
body: <p>I have a list that contains comma separated values as an individual element. like:</p>
  
  <pre class="lang-java prettyprint-override"><code>   List&lt;String&gt; personOutputList=new ArrayList&lt;&gt;();
     personOutputList.add("nexus 9k, nexus 9000,n9k");
     personOutputList.add( "nexus 7k, nexus 7000,n7k");
     personOutputList.add("nexus 9000");
     personOutputList.add("utility issue");
     personOutputList.add("network availability issue");
     personOutputList.add("nexus 7000");
     personOutputList.add("nexus 9k issue");
  </code></pre>
  
  <p>Is it possible to convert comma separated elements into part of separate elements list like:</p>
  
  <blockquote>
    <p>[nexus 9k, nexus 9000,n9k, nexus 7k, nexus 7000,n7k, nexus 9000, utility issue, network availability issue, nexus 7000, nexus 9k issue]</p>
  </blockquote>
  
  <pre class="lang-java prettyprint-override"><code>outputSet=outputSet.stream()
    .map(item-&gt;item.split(","))
    .collect(Collectors.toCollection(HashSet::new));
  </code></pre>
  
  <p>But it returns String[] String array, I want to be as List element</p>
  
  <blockquote>
    <p>[nexus 9k, nexus 9000,n9k, nexus 7k, nexus 7000, n7k, nexus 9000, utility issue, network availability issue, nexus 7000, nexus 9k issue]</p>
  </blockquote>
  
  <p>I need output like this:
  Set contains: [nexus 7000, nexus 7k, nexus 7000, n7k, nexus 9k, n9k, nexus 9000, nexus 9k issue, utility issue, network availability issue]</p>
  
  <p>Not like this: 
  Set contains what? : [[nexus 7k,  nexus 7000, n7k], [nexus 9k,  nexus 9000, n9k]]</p>