Top Description Fields Constructors Methods
com.mysql.cj.xdevapi

public Class JsonNumber

extends Object
implements JsonValue
Class Inheritance
All Implemented Interfaces
com.mysql.cj.xdevapi.JsonValue
Imports
java.math.BigDecimal

Represents a JSON number.

Field Summary

Modifier and TypeField and Description
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public BigDecimal

Returns:

BigDecimal value
getBigDecimal
()

Get number as BigDecimal.

public Integer

Returns:

Integer value
getInteger
()

Get number as Integer.

public JsonNumber

Returns:

this JsonNumber
setValue
(String
string number representation
value
)

Set number value.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

valback to summary
private String val

Constructor Detail

JsonNumberback to summary
public JsonNumber()

Method Detail

getBigDecimalback to summary
public BigDecimal getBigDecimal()

Get number as BigDecimal.

Returns:BigDecimal

BigDecimal value

getIntegerback to summary
public Integer getInteger()

Get number as Integer.

Returns:Integer

Integer value

setValueback to summary
public JsonNumber setValue(String value)

Set number value.

Parameters
value:String

string number representation

Returns:JsonNumber

this JsonNumber

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override