java.lang
Class Number

java.lang.Object
  |
  +--java.lang.Number
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BigDecimal, BigInteger, Byte, Double, Float, Integer, Long, Short

public abstract class Number
extends Object
implements Serializable

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.

Since:
JDK1.0
See Also:
Byte, Double, Float, Integer, Long, Short, Serialized Form

Constructor Summary
Number
copy->  new Number()
copy->  <Number var> = new Number();
 
Method Summary
 byte byteValue()
copy->  .byteValue()
copy->  <byte var>=<Number>.byteValue();
Returns the value of the specified number as a byte. This may involve rounding or truncation.
Returns:
the numeric value represented by this object after conversion to type byte.
Since:
JDK1.1
abstract  double doubleValue()
copy->  .doubleValue()
copy->  <double var>=<Number>.doubleValue();
Returns the value of the specified number as a double. This may involve rounding.
Returns:
the numeric value represented by this object after conversion to type double.
abstract  float floatValue()
copy->  .floatValue()
copy->  <float var>=<Number>.floatValue();
Returns the value of the specified number as a float. This may involve rounding.
Returns:
the numeric value represented by this object after conversion to type float.
abstract  int intValue()
copy->  .intValue()
copy->  <int var>=<Number>.intValue();
Returns the value of the specified number as an int. This may involve rounding.
Returns:
the numeric value represented by this object after conversion to type int.
abstract  long longValue()
copy->  .longValue()
copy->  <long var>=<Number>.longValue();
Returns the value of the specified number as a long. This may involve rounding.
Returns:
the numeric value represented by this object after conversion to type long.
 short shortValue()
copy->  .shortValue()
copy->  <short var>=<Number>.shortValue();
Returns the value of the specified number as a short. This may involve rounding or truncation.
Returns:
the numeric value represented by this object after conversion to type short.
Since:
JDK1.1
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait