title: Comparing the values of two generic Numbers
body: <p>I want to compare to variables, both of type <code>T extends Number</code>. Now I want to know which of the two variables is greater than the other or equal. Unfortunately I don't know the exact type yet, I only know that it will be a subtype of <code>java.lang.Number</code>. How can I do that?</p>
  
  <p><strong>EDIT</strong>: I tried another workaround using <code>TreeSet</code>s, which actually worked with natural ordering (of course it works, all subclasses of <code>Number</code> implement <code>Comparable</code> except for AtomicInteger and AtomicLong). Thus I'll lose duplicate values. When using <code>List</code>s, <code>Collection.sort()</code> will not accept my list due to bound mismatchs. Very unsatisfactory.</p>