mirror of
https://github.com/corda/corda.git
synced 2025-02-27 03:27:34 +00:00
Integer should implement Comparable<Integer>
This commit is contained in:
parent
2e813cff18
commit
4ae4221701
@ -1,6 +1,6 @@
|
||||
package java.lang;
|
||||
|
||||
public final class Integer extends Number {
|
||||
public final class Integer extends Number implements Comparable<Integer> {
|
||||
public static final Class TYPE = Class.forCanonicalName("I");
|
||||
|
||||
public static final int MIN_VALUE = 0x80000000;
|
||||
@ -28,6 +28,10 @@ public final class Integer extends Number {
|
||||
return value;
|
||||
}
|
||||
|
||||
public int compareTo(Integer other) {
|
||||
return value - other.value;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return toString(value);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user