title: How can I convert/map a List<Step<? extends LiteElement, ? extends LiteElement>>[] to List<Step<LiteElement, LiteElement>> []?
body: <p>I need to convert  <code>List&lt;Step&lt;? extends LiteElement, ? extends LiteElement&gt;&gt;[]</code> to <code>List&lt;Step&lt;LiteElement, LiteElement&gt;&gt;[]</code>. I assume this can be done with streams but I have not been able to get it to work.</p>
  <p>Something like:</p>
  <pre class="lang-java prettyprint-override"><code>private List&lt;Step&lt;LiteElement, LiteElement&gt;&gt;[] convert(List&lt;Step&lt;? extends LiteElement,? extends LiteElement&gt;&gt;[] stepLists) {
      return Arrays.stream(stepLists)
                   .map(l -&gt; (List&lt;Step&lt;LiteElement, LiteElement&gt;&gt;)l)
                   .collect(Collectors.toList()).toArray();
    }
  </code></pre>