title: String to ArrayList<Long>
body: <p>Currently i have:</p>
  
  <pre><code>String a = "123.5950,555,5973.1,6321.905,6411.810000000001,6591.855"
  </code></pre>
  
  <p>I can turn it into an array list of Strings then into array list of Longs: </p>
  
  <pre><code>ArrayList&lt;String&gt; vals = new ArrayList&lt;String&gt;(Arrays.asList(a.split(","));
  ArrayList&lt;Long&gt; longs = new ArrayList&lt;&gt;();
  
  for(String ks : vals){
         longs.add(Long.parseLong(ks));
  }
  </code></pre>
  
  <p>I tried to do this with <code>Stream</code> to make this more 'fun' but cant seem to be successful with this:</p>
  
  <pre><code>ArrayList&lt;Long&gt; longs = a.stream().map(Long::parseLong).collect(Collectors.toList());
  </code></pre>
  
  <p>I dont think the for loop is very elegant, how can i do it with <code>Stream</code>?</p>
  
  <p>Edit: copied to original string wrong</p>