title: Java generics and the Number class
body: <p>I want to create a method that compares a number but can have an input that is any of the subclasses of Number.</p>
  
  <p>I have looked at doing this in the following manner...</p>
  
  <pre><code>public static &lt;T extends Number&gt; void evaluate(T inputNumber) {
    if (inputNumber &gt;= x) {
      ...
    }
  }
  </code></pre>
  
  <p>I need to get the actual primative before I can perform the comparison, the Number class has methods to retrieve this for each primative but I want a clean way of selecting the correct one.</p>
  
  <p>Is this possible?</p>
  
  <p>Cheers</p>