add additional methods and fields to class library

This commit is contained in:
Joel Dice
2008-03-20 18:40:18 -06:00
parent 8e1ec5794f
commit 7dd9b96717
6 changed files with 57 additions and 10 deletions

View File

@ -58,6 +58,10 @@ public final class Integer extends Number implements Comparable<Integer> {
return Long.toString(((long) v) & 0xFFFFFFFFL, 16);
}
public static String toBinaryString(int v) {
return Long.toString(((long) v) & 0xFFFFFFFFL, 2);
}
public byte byteValue() {
return (byte) value;
}