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 BigDecimalbigDecimalValue()BigIntegerbigIntegerValue()static Numericcreate(Number number)Return aNumericinstance for the givennumber.doubledoubleValue()booleanequals(Object obj)floatfloatValue()inthashCode()intintValue()booleanisNaN()longlongValue()static Numericparse(String s)Parse and return aNumericinstance for the givens.shortshortValue()StringtoString()
-
-
-
Field Detail
-
NaN
public static final Numeric NaN
Constant for theNaNvalue.
-
-
Method Detail
-
create
public static Numeric create(Number number)
Return aNumericinstance for the givennumber. Null values or infiniteDoubleorFloatare rejected.- Parameters:
number- the number- Returns:
- the
Numericvalue - Throws:
NumberFormatException- when the number is infinite
-
shortValue
public short shortValue()
- Overrides:
shortValuein classNumber
-
floatValue
public float floatValue()
- Specified by:
floatValuein classNumber
-
doubleValue
public double doubleValue()
- Specified by:
doubleValuein classNumber
-
isNaN
public boolean isNaN()
- Returns:
truewhen this number representsNaN
-
bigDecimalValue
public BigDecimal bigDecimalValue()
- Returns:
- the numeric value represented by this object after conversion
to type
BigDecimal. It can benullwhen this instance represents theNaNvalue.
-
bigIntegerValue
public BigInteger bigIntegerValue()
- Returns:
- the numeric value represented by this object after conversion
to type
BigInteger. It can benullwhen this instance represents theNaNvalue.
-
-