All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.lang.Number

java.lang.Object
   |
   +----java.lang.Number

public 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.

See Also:
Byte, Double, Float, Integer, Long, Short

Constructor Index

 o Number()

Method Index

 o byteValue()
Returns the value of the specified number as a byte.
 o doubleValue()
Returns the value of the specified number as a double.
 o floatValue()
Returns the value of the specified number as a float.
 o intValue()
Returns the value of the specified number as an int.
 o longValue()
Returns the value of the specified number as a long.
 o shortValue()
Returns the value of the specified number as a short.

Constructors

 o Number
    method Number() public 

Methods

 o intValue
    method intValue() returns int public abstract    
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.
 o longValue
    method longValue() returns long public abstract    
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.
 o floatValue
    method floatValue() returns float public abstract    
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.
 o doubleValue
    method doubleValue() returns double public abstract    
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.
 o byteValue
    method byteValue() returns byte public     
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.
 o shortValue
    method shortValue() returns short public     
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.

All Packages  Class Hierarchy  This Package  Previous  Next  Index