Documentation  › java.lang  › Number
 
 


  Number
  public abstract

  Inherits From:   Object
  Conforms To:   Serializable
  Declared In:   java.lang


Class Description
 
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.



Class Variables
 
None declared in this class.


Instance Variables
 
None declared in this class.


Constructors
 
Number
public Number( )

No description available for this constructor.


Class Methods
 
None declared in this class.


Instance Methods
 
byteValue
public byte byteValue( )

Returns the value of the specified number as a byte. This may involve rounding or truncation.


doubleValue
public abstract double doubleValue( )

Returns the value of the specified number as a double. This may involve rounding.


floatValue
public abstract float floatValue( )

Returns the value of the specified number as a float. This may involve rounding.


intValue
public abstract int intValue( )

Returns the value of the specified number as an int. This may involve rounding or truncation.


longValue
public abstract long longValue( )

Returns the value of the specified number as a long. This may involve rounding or truncation.


shortValue
public short shortValue( )

Returns the value of the specified number as a short. This may involve rounding or truncation.


Known Subclasses
 
BigDecimal, BigInteger, Byte, Double, Float, Integer, Long, Short



 
 
  dydoc
  3/10/05