Class: java.lang.Number

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.

Authors:
@author Lee Boynton
@author Arthur van Hoff
See:
@see Byte
@see Double
@see Float
@see Integer
@see Long
@see Short
Since:
@since JDK1.0

Inheritance

Superclass tree: Implements:

Methods

  • Numbertop

    public Number()
    Google Code Search
    Stack Overflow
  • byteValuetop

    public byte byteValue()
    Returns the value of the specified number as a byte. This may involve rounding or truncation.
    Return:
    @return the numeric value represented by this object after conversion to type byte.
    Since:
    @since JDK1.1
    Google Code Search
    Stack Overflow
  • doubleValuetop

    public abstract double doubleValue()
    Returns the value of the specified number as a double. This may involve rounding.
    Return:
    @return the numeric value represented by this object after conversion to type double.
    Google Code Search
    Stack Overflow
  • floatValuetop

    public abstract float floatValue()
    Returns the value of the specified number as a float. This may involve rounding.
    Return:
    @return the numeric value represented by this object after conversion to type float.
    Google Code Search
    Stack Overflow
  • intValuetop

    public abstract int intValue()
    Returns the value of the specified number as an int. This may involve rounding or truncation.
    Return:
    @return the numeric value represented by this object after conversion to type int.
    Google Code Search
    Stack Overflow
  • longValuetop

    public abstract long longValue()
    Returns the value of the specified number as a long. This may involve rounding or truncation.
    Return:
    @return the numeric value represented by this object after conversion to type long.
    Google Code Search
    Stack Overflow
  • shortValuetop

    public short shortValue()
    Returns the value of the specified number as a short. This may involve rounding or truncation.
    Return:
    @return the numeric value represented by this object after conversion to type short.
    Since:
    @since JDK1.1
    Google Code Search
    Stack Overflow