title: Shrinking an ArrayList to a new size
body: <p>Do I really need to implement it myself?</p>
  
  <pre><code>private void shrinkListTo(ArrayList&lt;Result&gt; list, int newSize) {
    for (int i = list.size() - 1; i &gt;= newSize; --i)
    list.remove(i);
  }
  </code></pre>