|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.math.Number
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.
| 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 |
public static final double NEGATIVE_INFINITY
public static final double POSITIVE_INFINITY
public static final double DOUBLE_MAX_VALUE
public static final double DOUBLE_MIN_VALUE
public static final int INTEGER_MAX_VALUE
public static final int INTEGER_MIN_VALUE
public static final long LONG_MAX_VALUE
public static final long LONG_MIN_VALUE
| Constructor Detail |
public Number()
| Method Detail |
public abstract int intValue()
Number as an int.
public abstract long longValue()
Number as a long.
public abstract float floatValue()
Number as a float.
public abstract double doubleValue()
Number as a double.
public byte byteValue()
Number as a byte.
public short shortValue()
Number as a short.
public static int digit(char ch,
int radix)
public static char forDigit(int digit,
int radix)
public static boolean isInfinite(double value)
public static boolean isNaN(double value)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||