mirror of
https://github.com/corda/corda.git
synced 2025-06-13 12:48:18 +00:00
make Boolean, Byte, Short, etc. implement Comparable
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
package java.lang;
|
||||
|
||||
public final class Byte extends Number {
|
||||
public final class Byte extends Number implements Comparable<Byte> {
|
||||
public static final Class TYPE = Class.forCanonicalName("B");
|
||||
|
||||
private final byte value;
|
||||
@ -25,6 +25,10 @@ public final class Byte extends Number {
|
||||
return toString(value);
|
||||
}
|
||||
|
||||
public int compareTo(Byte o) {
|
||||
return value - o.value;
|
||||
}
|
||||
|
||||
public static String toString(byte v, int radix) {
|
||||
return Long.toString(v, radix);
|
||||
}
|
||||
|
Reference in New Issue
Block a user