This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


java.lang
class Number

java.lang.Object extended by java.lang.Number
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AtomicInteger, AtomicLong, BigDecimal, BigInteger, Byte, Double, Float, Integer, Long, Short

public abstract class Number
extends Object
implements Serializable

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.


Constructor Summary

          
 
Method Summary
 byte

          Returns the value of the specified number as a byte.
abstract double

          Returns the value of the specified number as a double.
abstract float

          Returns the value of the specified number as a float.
abstract int

          Returns the value of the specified number as an int.
abstract long

          Returns the value of the specified number as a long.
 short

          Returns the value of the specified number as a short.
 
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

byteValue

public byte byteValue()
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.

doubleValue

public abstract double doubleValue()
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.

floatValue

public abstract float floatValue()
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.

intValue

public abstract int intValue()
Returns the value of the specified number as an int. This may involve rounding or truncation.

Returns:
the numeric value represented by this object after conversion to type int.

longValue

public abstract long longValue()
Returns the value of the specified number as a long. This may involve rounding or truncation.

Returns:
the numeric value represented by this object after conversion to type long.

shortValue

public short shortValue()
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.


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.