title: Jsoup: sort Elements
body: <p>I need to sort a Jsoup Elements container by its ownText(). What is a recommended way to accomplish that?</p>
  
  <p>Does convertinng it to an ArrayList first for use with <a href="https://stackoverflow.com/questions/890254/sort-arraylist/890470#890470">a custom comparator</a> make sense?</p>
  
  <p>BTW, I tried sorting it directly, as in <code>Collections.sort(anElementsList)</code> but the compiler complains:</p>
  
  <pre><code>Bound mismatch: The generic method sort(List&lt;T&gt;) of type Collections is not applicable for
  the arguments (Elements). The inferred type Element is not a valid substitute for the 
  bounded parameter &lt;T extends Comparable&lt;? super T&gt;&gt;
  </code></pre>