| 11 | package java.lang; |
| 12 | |
| 13 | public final class Byte extends Number implements Comparable<Byte> { |
| 14 | public static final Class TYPE = avian.Classes.forCanonicalName("B"); |
| 15 | |
| 16 | public static final byte MIN_VALUE = -128; |
| 17 | public static final byte MAX_VALUE = 127; |
| 18 | |
| 19 | private final byte value; |
| 20 | |
| 21 | public Byte(byte value) { |
| 22 | this.value = value; |
| 23 | } |
| 24 | |
| 25 | public static Byte valueOf(byte value) { |
| 26 | return new Byte(value); |
| 27 | } |
| 28 | |
| 29 | public boolean equals(Object o) { |
| 30 | return o instanceof Byte && ((Byte) o).value == value; |
| 31 | } |
| 32 | |
| 33 | public int hashCode() { |
| 34 | return value; |
| 35 | } |
| 36 | |
| 37 | public String toString() { |
| 38 | return toString(value); |
| 39 | } |
| 40 | |
| 41 | public int compareTo(Byte o) { |
| 42 | return value - o.value; |
| 43 | } |
| 44 | |
| 45 | public static String toString(byte v, int radix) { |
| 46 | return Long.toString(v, radix); |
| 47 | } |
| 48 | |
| 49 | public static String toString(byte v) { |
| 50 | return toString(v, 10); |
| 51 | } |
| 52 | |
| 53 | public static byte parseByte(String s) { |
| 54 | return (byte) Integer.parseInt(s); |
| 55 | } |
| 56 | |
| 57 | public byte byteValue() { |
| 58 | return value; |
| 59 | } |
| 60 | |
| 61 | public short shortValue() { |
| 62 | return value; |
| 63 | } |
| 64 | |
| 65 | public int intValue() { |
| 66 | return value; |
| 67 | } |
| 68 | |
| 69 | public long longValue() { |
| 70 | return value; |
nothing calls this directly
no test coverage detected