FileDocCategorySizeDatePackage
Number.javaAPI DocAndroid 1.5 API2915Wed May 06 22:41:04 BST 2009java.lang

Number

public abstract class Number extends Object implements Serializable
The abstract superclass of the classes which represent numeric base types (that is {@link Byte}, {@link Short}, {@link Integer}, {@link Long}, {@link Float}, and {@link Double}.
since
Android 1.0

Fields Summary
private static final long
serialVersionUID
Constructors Summary
public Number()
Empty default constructor.

since
Android 1.0


                
      
    
Methods Summary
public bytebyteValue()
Returns this object's value as a byte. Might involve rounding and/or truncating the value, so it fits into a byte.

return
the primitive byte value of this object.
since
Android 1.0

        return (byte) intValue();
    
public abstract doubledoubleValue()
Returns this object's value as a double. Might involve rounding.

return
the primitive double value of this object.
since
Android 1.0

public abstract floatfloatValue()
Returns this object's value as a float. Might involve rounding.

return
the primitive float value of this object.
since
Android 1.0

public abstract intintValue()
Returns this object's value as an int. Might involve rounding and/or truncating the value, so it fits into an int.

return
the primitive int value of this object.
since
Android 1.0

public abstract longlongValue()
Returns this object's value as a long. Might involve rounding and/or truncating the value, so it fits into a long.

return
the primitive long value of this object.
since
Android 1.0

public shortshortValue()
Returns this object's value as a short. Might involve rounding and/or truncating the value, so it fits into a short.

return
the primitive short value of this object.
since
Android 1.0

        return (short) intValue();