title: Collect property of objects in collection
body: <p>In C# I can do this:</p>
  
  <pre><code>IEnumerable&lt;long&gt; ids = things.select(x =&gt; x.Id);
  </code></pre>
  
  <p>In Java I have to do this:</p>
  
  <pre><code>Collection&lt;Long&gt; ids = new ArrayList&lt;Long&gt;(things.size());
  for(Thing x : things)
     ids.add(x.getId());
  </code></pre>
  
  <p>Have to do this sort of thing quite a lot now and wonder if there is a more generic way to do this in Java. Could create a method to do it, but then I would have to add an interface with the getId method or something like that... which I can't...</p>