ewe.math
Class Number

java.lang.Object
  extended byewe.math.Number
Direct Known Subclasses:
BigDecimal, BigInteger

public abstract class Number
extends Object

Number is a generic superclass of all the numeric classes, including the wrapper classes Byte, Short, Integer, Long, Float, and Double. Also worth mentioning are the classes in java.math. It provides ways to convert numeric objects to any primitive.

Since:
1.0

Field Summary
static double DOUBLE_MAX_VALUE
           
static double DOUBLE_MIN_VALUE
           
static int INTEGER_MAX_VALUE
           
static int INTEGER_MIN_VALUE
           
static long LONG_MAX_VALUE
           
static long LONG_MIN_VALUE
           
static double NEGATIVE_INFINITY
           
static double POSITIVE_INFINITY
           
 
Constructor Summary
Number()
          The basic constructor (often called implicitly).
 
Method Summary
 byte byteValue()
          Return the value of this Number as a byte.
static int digit(char ch, int radix)
           
abstract  double doubleValue()
          Return the value of this Number as a double.
abstract  float floatValue()
          Return the value of this Number as a float.
static char forDigit(int digit, int radix)
           
abstract  int intValue()
          Return the value of this Number as an int.
static boolean isInfinite(double value)
           
static boolean isNaN(double value)
           
abstract  long longValue()
          Return the value of this Number as a long.
 short shortValue()
          Return the value of this Number as a short.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, toString
 

Field Detail

NEGATIVE_INFINITY

public static final double NEGATIVE_INFINITY

POSITIVE_INFINITY

public static final double POSITIVE_INFINITY

DOUBLE_MAX_VALUE

public static final double DOUBLE_MAX_VALUE

DOUBLE_MIN_VALUE

public static final double DOUBLE_MIN_VALUE

INTEGER_MAX_VALUE

public static final int INTEGER_MAX_VALUE
See Also:
Constant Field Values

INTEGER_MIN_VALUE

public static final int INTEGER_MIN_VALUE
See Also:
Constant Field Values

LONG_MAX_VALUE

public static final long LONG_MAX_VALUE
See Also:
Constant Field Values

LONG_MIN_VALUE

public static final long LONG_MIN_VALUE
See Also:
Constant Field Values
Constructor Detail

Number

public Number()
The basic constructor (often called implicitly).

Method Detail

intValue

public abstract int intValue()
Return the value of this Number as an int.

Returns:
the int value

longValue

public abstract long longValue()
Return the value of this Number as a long.

Returns:
the long value

floatValue

public abstract float floatValue()
Return the value of this Number as a float.

Returns:
the float value

doubleValue

public abstract double doubleValue()
Return the value of this Number as a double.

Returns:
the double value

byteValue

public byte byteValue()
Return the value of this Number as a byte.

Returns:
the byte value

shortValue

public short shortValue()
Return the value of this Number as a short.

Returns:
the short value

digit

public static int digit(char ch,
                        int radix)

forDigit

public static char forDigit(int digit,
                            int radix)

isInfinite

public static boolean isInfinite(double value)

isNaN

public static boolean isNaN(double value)