title: Cannot pass typed Collection as method parameter
body: <p>Here's a scenario where you can't pass a typed Collection as a method parameter:</p>
  <pre class="lang-java prettyprint-override"><code>public static Collection&lt;Category&gt; allCategories(){
      return Arrays.asList(
              Category.firstCategory(),
              Category.secondCategory(),
              Category.thirdCategory()
      );
  }
  </code></pre>
  <p>And a method</p>
  <pre class="lang-java prettyprint-override"><code>public void setAcceptableValues(Collection&lt;T&gt; newValues) {
  // ...
  }
  </code></pre>
  <p>And this does not work:</p>
  <p><code>setAcceptableValues(allCategories());</code></p>
  <p>How do you pass a typed Collection as method parameter?</p>