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
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, Byte, Short

Constructor Index

 o Number()

Method Index

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

Constructors

 o Number
  public Number()

Methods

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

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

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

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

 o byteValue
  public byte byteValue()
Returns the value of the number as a byte. This may involve rounding or truncation if the number is not already a byte.

 o shortValue
  public short shortValue()
Returns the value of the number as a short. This may involve rounding or truncation if the number is not already a short.


All Packages  Class Hierarchy  This Package  Previous  Next  Index