Home » openjdk-7 » java » lang » [javadoc | source]
java.lang
abstract public class: Number [javadoc | source]
java.lang.Object
   java.lang.Number

All Implemented Interfaces:
    Serializable

Direct Known Subclasses:
    Byte, Long, Float, AtomicLong, Integer, AtomicInteger, BigInteger, Short, Double, BigDecimal

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.

Method from java.lang.Number Summary:
byteValue,   doubleValue,   floatValue,   intValue,   longValue,   shortValue
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.lang.Number Detail:
 public byte byteValue() 
    Returns the value of the specified number as a byte. This may involve rounding or truncation.
 abstract public double doubleValue()
    Returns the value of the specified number as a double. This may involve rounding.
 abstract public float floatValue()
    Returns the value of the specified number as a float. This may involve rounding.
 abstract public int intValue()
    Returns the value of the specified number as an int. This may involve rounding or truncation.
 abstract public long longValue()
    Returns the value of the specified number as a long. This may involve rounding or truncation.
 public short shortValue() 
    Returns the value of the specified number as a short. This may involve rounding or truncation.