Package com.google.api.client.json.gson
Class GsonGenerator.StringNumber
java.lang.Object
java.lang.Number
com.google.api.client.json.gson.GsonGenerator.StringNumber
- All Implemented Interfaces:
Serializable
- Enclosing class:
GsonGenerator
Hack to support numbers encoded as a string for JsonWriter. Unfortunately, JsonWriter doesn't
provide a way to print an arbitrary-precision number given a String and instead expects the
number to extend Number. So this lets us bypass that problem by overriding the toString()
implementation of Number to use our string. Note that this is not actually a valid Number.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Number
byteValue, shortValue
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
encodedValue
-
-
Constructor Details
-
StringNumber
StringNumber(String encodedValue)
-
-
Method Details
-
doubleValue
public double doubleValue()- Specified by:
doubleValue
in classNumber
-
floatValue
public float floatValue()- Specified by:
floatValue
in classNumber
-
intValue
public int intValue() -
longValue
public long longValue() -
toString
-