|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--java.lang.Number
The abstract class Number is the superclass of
classes Byte, Double, Float,
Integer, Long, and Short.
Subclasses of Number must provide methods to convert
the represented numeric value to byte, double,
float, int, long, and
short.
Byte,
Double,
Float,
Integer,
Long,
Short, Serialized Form| Constructor Summary | |
Number()
|
|
| Method Summary | |
byte |
byteValue()
Returns the value of the specified number as a byte. |
abstract double |
doubleValue()
Returns the value of the specified number as a double. |
abstract float |
floatValue()
Returns the value of the specified number as a float. |
abstract int |
intValue()
Returns the value of the specified number as an int. |
abstract long |
longValue()
Returns the value of the specified number as a long. |
short |
shortValue()
Returns the value of the specified number as a short. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Number()
| Method Detail |
public abstract int intValue()
int.
This may involve rounding.int.public abstract long longValue()
long.
This may involve rounding.long.public abstract float floatValue()
float.
This may involve rounding.float.public abstract double doubleValue()
double.
This may involve rounding.double.public byte byteValue()
byte.
This may involve rounding or truncation.byte.public short shortValue()
short.
This may involve rounding or truncation.short.
|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.