public abstract class java.lang
Number


Show All Login
Java SE 6
  
Implements: Serializable
Extended by: AtomicInteger, AtomicLong, BigDecimal, BigInteger, Byte, Double, Float, Integer, Long, Short
Details
The abstract class Number is the superclass of classes BigDecimal, BigInteger, 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.
version1.30, 11/17/05
sinceJDK1.0
See also java.lang.Byte, java.lang.Double, java.lang.Float, java.lang.Integer, java.lang.Long, java.lang.Short


Constructors
public Number()

Methods
public byte byteValue() Details
Returns the value of the specified number as a byte. This may involve rounding or truncation.
returnthe numeric value represented by this object after conversion to type byte.
sinceJDK1.1
abstract public double doubleValue() Details
Returns the value of the specified number as a double. This may involve rounding.
returnthe numeric value represented by this object after conversion to type double.
abstract public float floatValue() Details
Returns the value of the specified number as a float. This may involve rounding.
returnthe numeric value represented by this object after conversion to type float.
abstract public int intValue() Details
Returns the value of the specified number as an int. This may involve rounding or truncation.
returnthe numeric value represented by this object after conversion to type int.
abstract public long longValue() Details
Returns the value of the specified number as a long. This may involve rounding or truncation.
returnthe numeric value represented by this object after conversion to type long.
public short shortValue() Details
Returns the value of the specified number as a short. This may involve rounding or truncation.
returnthe numeric value represented by this object after conversion to type short.
sinceJDK1.1