How come Java's Integer class does not have compare() method?
<p>Double has Double.compare for comparing two double primitives. Why doesn't Integer have one?</p>

<p>I understand it's some trivial amount of code to write, but asking out of curiosity.</p>

<p>Edit: I realize both Integer and Double have compareTo. But using compareTo requires boxing the int primitive in an Integer object, which has a pretty high cost. Also, inta > intb is not the same as compare(inta, intb), as the latter returns +1, 0, or -1, while the former is true/false ....</p>
