Package io.vertx.sqlclient.data
Class Numeric
- java.lang.Object
-
- java.lang.Number
-
- io.vertx.sqlclient.data.Numeric
-
- All Implemented Interfaces:
Serializable
public final class Numeric extends Number
An arbitrary number that supports NaN.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BigDecimal
bigDecimalValue()
BigInteger
bigIntegerValue()
static Numeric
create(Number number)
Return aNumeric
instance for the givennumber
.double
doubleValue()
boolean
equals(Object obj)
float
floatValue()
int
hashCode()
int
intValue()
boolean
isNaN()
long
longValue()
static Numeric
parse(String s)
Parse and return aNumeric
instance for the givens
.short
shortValue()
String
toString()
-
-
-
Field Detail
-
NaN
public static final Numeric NaN
Constant for theNaN
value.
-
-
Method Detail
-
create
public static Numeric create(Number number)
Return aNumeric
instance for the givennumber
. Null values or infiniteDouble
orFloat
are rejected.- Parameters:
number
- the number- Returns:
- the
Numeric
value - Throws:
NumberFormatException
- when the number is infinite
-
shortValue
public short shortValue()
- Overrides:
shortValue
in classNumber
-
floatValue
public float floatValue()
- Specified by:
floatValue
in classNumber
-
doubleValue
public double doubleValue()
- Specified by:
doubleValue
in classNumber
-
isNaN
public boolean isNaN()
- Returns:
true
when this number representsNaN
-
bigDecimalValue
public BigDecimal bigDecimalValue()
- Returns:
- the numeric value represented by this object after conversion
to type
BigDecimal
. It can benull
when this instance represents theNaN
value.
-
bigIntegerValue
public BigInteger bigIntegerValue()
- Returns:
- the numeric value represented by this object after conversion
to type
BigInteger
. It can benull
when this instance represents theNaN
value.
-
-