| <html> | |
| <body> | |
| Suggests to use the static <code>Integer.compare()</code> method and similar methods where more verbose or less efficient constructs are | |
| used. For example, <code>x > y ? 1 : x < y ? -1 : 0</code> or <code>Integer.valueOf(x).compareTo(y)</code> could be | |
| replaced with <code>Integer.compare(x, y)</code>. If <code>x</code> and <code>y</code> are already boxed integers, then | |
| <code>x.compareTo(y)</code> is suggested. | |
| <p><code>Double.compare</code> and <code>Float.compare</code> methods appeared in Java 1.4, methods for other primitive types | |
| are available since Java 1.7</p> | |
| <!-- tooltip end --> | |
| <p><small>New in 2017.2</small></p> | |
| </body> | |
| </html> |