2007-07-19 21:18:25 -06:00
|
|
|
package java.lang;
|
|
|
|
|
2007-07-21 11:50:26 -06:00
|
|
|
public final class Integer extends Number {
|
2007-07-19 21:18:25 -06:00
|
|
|
private final int value;
|
|
|
|
|
|
|
|
public Integer(int value) {
|
|
|
|
this.value = value;
|
|
|
|
}
|
|
|
|
|
2007-07-21 11:50:26 -06:00
|
|
|
public byte byteValue() {
|
|
|
|
return (byte) value;
|
|
|
|
}
|
|
|
|
|
|
|
|
public short shortValue() {
|
|
|
|
return (short) value;
|
|
|
|
}
|
|
|
|
|
2007-07-19 21:18:25 -06:00
|
|
|
public int intValue() {
|
|
|
|
return value;
|
|
|
|
}
|
2007-07-21 11:50:26 -06:00
|
|
|
|
|
|
|
public long longValue() {
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
|
|
|
public float floatValue() {
|
|
|
|
return (float) value;
|
|
|
|
}
|
|
|
|
|
|
|
|
public double doubleValue() {
|
|
|
|
return (double) value;
|
|
|
|
}
|
2007-07-19 21:18:25 -06:00
|
|
|
}
|