title: Return sorted list in Java
body: <p>I am coding something like this:</p>
  
  <pre><code>List&lt;Bean&gt; beans = service.findBeans();
  Collections.sort(beans, new BeanComparator());
  return beans;
  </code></pre>
  
  <p>It works perfectly. What I am looking for is a shortcut to do this with just one line:</p>
  
  <pre><code>return somelibrary.Collections.sort(service.findBeans(), new BeanComparator());
  </code></pre>
  
  <p>Or:</p>
  
  <pre><code>return somelibrary.newList(service.findBeans(), new BeanComparator());
  </code></pre>
  
  <p>Note that it is required a mutable list.</p>