java.lang
Class Number

java.lang.Object
  |
  +--java.lang.Number
Direct Known Subclasses:
Double, Float, Integer, Long

public abstract class Number
extends Object

Number is an abstract superclass for numeric scalar types. Integer, Long, Float and Double are subclasses of Number that bind to a particular numeric representation.

See Also:
Integer, Long, Float, Double

Constructor Summary
Number()
           
 
Method Summary
abstract  double doubleValue()
          Returns the value of the number as a double.
abstract  float floatValue()
          Returns the value of the number as a float.
abstract  int intValue()
          Returns the value of the number as an int.
abstract  long longValue()
          Returns the value of the number as a long.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Number

public Number()
Method Detail

intValue

public abstract int intValue()
Returns the value of the number as an int. This may involve rounding if the number is not already an integer.


longValue

public abstract long longValue()
Returns the value of the number as a long. This may involve rounding if the number is not already a long.


floatValue

public abstract float floatValue()
Returns the value of the number as a float. This may involve rounding if the number is not already a float.


doubleValue

public abstract double doubleValue()
Returns the value of the number as a double. This may involve rounding if the number is not already a double.