public abstract class Number
extends Object implements Serializable
| java.lang.Object | |
| ↳ | java.lang.Number |
| |
抽象类 Number是类超 BigDecimal , BigInteger , Byte , Double , Float , Integer , Long ,并 Short 。
的子类 Number必须提供方法为代表的数值转换为 byte , double , float , int , long ,并 short 。
Public constructors |
|
|---|---|
Number() |
|
Public methods |
|
|---|---|
byte |
byteValue() 以 |
abstract double |
doubleValue() 以 |
abstract float |
floatValue() 以 |
abstract int |
intValue() 以 |
abstract long |
longValue() 以 |
short |
shortValue() 以 |
Inherited methods |
|
|---|---|
java.lang.Object
|
|
byte byteValue ()
以byte返回指定数字的值。 这可能涉及四舍五入或截断。
| Returns | |
|---|---|
byte |
the numeric value represented by this object after conversion to type byte. |
double doubleValue ()
以double返回指定数字的值。 这可能涉及四舍五入。
| Returns | |
|---|---|
double |
the numeric value represented by this object after conversion to type double. |
float floatValue ()
以float返回指定数字的值。 这可能涉及四舍五入。
| Returns | |
|---|---|
float |
the numeric value represented by this object after conversion to type float. |
int intValue ()
以int返回指定数字的int 。 这可能涉及四舍五入或截断。
| Returns | |
|---|---|
int |
the numeric value represented by this object after conversion to type int. |
long longValue ()
以long返回指定数字的值。 这可能涉及四舍五入或截断。
| Returns | |
|---|---|
long |
the numeric value represented by this object after conversion to type long. |
short shortValue ()
以short返回指定数字的值。 这可能涉及四舍五入或截断。
| Returns | |
|---|---|
short |
the numeric value represented by this object after conversion to type short. |