2004.04.29


com.jdc.math
Class Number

java.lang.Object
  |
  +--java.lang.Number
        |
        +--com.jdc.math.Number
All Implemented Interfaces:
DefaultLocale, Serializable
Direct Known Subclasses:
Decimal, Integer

public abstract class Number
extends Number
implements DefaultLocale, Serializable

Interface Number represents a decimal or integer number. The Number interface provides basic operations for conversion to primitive types as well as checking for a valid number.

Reference: Cool Menu Reference

Version:
1.0
Author:
Jay Damon
See Also:
Number, Serialized Form

Field Summary
 
Fields inherited from interface com.jdc.util.DefaultLocale
DEFAULT_LOCALE
 
Constructor Summary
Number()
           
 
Method Summary
 double doubleValue()
          Returns the value of the specified number as a double.
 float floatValue()
          Returns the value of the specified number as a float.
 int intValue()
          Returns the value of the specified number as an int.
abstract  boolean isNaN()
          Returns true if the value represented by this Number object is Not-a-Number, i.e.
 long longValue()
          Returns the value of the specified number as a long.
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
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

doubleValue

public double doubleValue()
Returns the value of the specified number as a double. This may involve rounding

Specified by:
doubleValue in class Number
Returns:
The numeric value represented by this object after conversion to type double.

floatValue

public float floatValue()
Returns the value of the specified number as a float. This may involve rounding.

Specified by:
floatValue in class Number
Returns:
The numeric value represented by this object after conversion to type float.

intValue

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

Specified by:
intValue in class Number
Returns:
The numeric value represented by this object after conversion to type int

isNaN

public abstract boolean isNaN()
Returns true if the value represented by this Number object is Not-a-Number, i.e. NaN.

Returns:
True if the value is Not-a-Number, i.e. NaN. False if the value is a valid number.

longValue

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

Specified by:
longValue in class Number
Returns:
The numeric value represented by this object after conversion to type long.

2004.04.29



Copyright © 2004 J. Damon & Co.; All Rights Reserved WorldWide.