public final class Numeric extends Number
Modifier and Type | Field and Description |
---|---|
static Numeric |
NaN
Constant for the
NaN value. |
Modifier and Type | Method and Description |
---|---|
BigDecimal |
bigDecimalValue() |
BigInteger |
bigIntegerValue() |
static Numeric |
create(Number number)
Return a
Numeric instance for the given number . |
double |
doubleValue() |
boolean |
equals(Object obj) |
float |
floatValue() |
int |
hashCode() |
int |
intValue() |
boolean |
isNaN() |
long |
longValue() |
static Numeric |
parse(String s)
Parse and return a
Numeric instance for the given s . |
short |
shortValue() |
String |
toString() |
public static final Numeric NaN
NaN
value.public static Numeric create(Number number)
Numeric
instance for the given number
.
Null values or infinite Double
or Float
are rejected.number
- the numberNumeric
valueNumberFormatException
- when the number is infinitepublic short shortValue()
shortValue
in class Number
public float floatValue()
floatValue
in class Number
public double doubleValue()
doubleValue
in class Number
public boolean isNaN()
true
when this number represents NaN
public BigDecimal bigDecimalValue()
BigDecimal
. It can be null
when this instance
represents the NaN
value.public BigInteger bigIntegerValue()
BigInteger
. It can be null
when this instance
represents the NaN
value.Copyright © 2024 Eclipse. All rights reserved.