4 public Integer(int value) {
8 public Integer(String str) {
9 value=Integer.parseInt(str, 10);
12 public int intValue() {
16 public double doubleValue() {
20 public byte[] intToByteArray() {
21 byte[] b = new byte[4];
22 for (int i = 0; i < 4; i++) {
23 int offset = (b.length - 1 - i) * 8;
24 b[i] = (byte) ((value >> offset) & 0xFF);
29 public int byteArrayToInt(byte [] b) {
31 val = b[0] << 24 + ((b[1] & 0xFF) << 16) + ((b[2] & 0xFF) << 8) + (b[3] & 0xFF);
35 public static int parseInt(String str) {
36 return Integer.parseInt(str, 10);
39 public static int parseInt(String str, int radix) {
43 byte[] chars=str.getBytes();
45 while(chars[start]==' '||chars[start]=='\t')
48 if (chars[start]=='-') {
53 for(int i=start; cont&&i<str.length(); i++) {
58 else if (b>='a'&&b<='z')
60 else if (b>='A'&&b<='Z')
68 value=value*radix+val;
76 public String toString() {
77 return String.valueOf(value);
80 public static String toString( int i ) {
81 Integer I = new Integer( i );
85 public int hashCode() {
89 public boolean equals(Object o) {
90 if (o.getType()!=getType())
93 if (s.intValue()!=this.value)