包函数 | |
| JsonPrimitive (Object primitive) | |
| void | setValue (Object primitive) |
| Boolean | getAsBooleanWrapper () |
包函数 继承自 com.google.gson.JsonElement | |
| Boolean | getAsBooleanWrapper () |
静态 Private 成员函数 | |
| static boolean | isPrimitiveOrString (Object target) |
| static boolean | isIntegral (JsonPrimitive primitive) |
Private 属性 | |
| Object | value |
静态 Private 属性 | |
| static final Class<?>[] | PRIMITIVE_TYPES |
A class representing a Json primitive value. A primitive value is either a String, a Java primitive, or a Java primitive wrapper type.
|
inline |
Create a primitive containing a boolean value.
| bool | the value to create the primitive with. |
|
inline |
Create a primitive containing a Number.
| number | the value to create the primitive with. |
|
inline |
Create a primitive containing a String value.
| string | the value to create the primitive with. |
|
inline |
Create a primitive containing a character. The character is turned into a one character String since Json only supports String.
| c | the value to create the primitive with. |
|
inlinepackage |
Create a primitive using the specified Object. It must be an instance of Number, a Java primitive type, or a String.
| primitive | the value to create the primitive with. |
|
inline |
|
inline |
convenience method to get this element as a BigDecimal.
| NumberFormatException | if the value contained is not a valid BigDecimal. |
|
inline |
convenience method to get this element as a BigInteger.
| NumberFormatException | if the value contained is not a valid BigInteger. |
|
inline |
convenience method to get this element as a boolean value.
|
inlinepackage |
|
inline |
|
inline |
|
inline |
convenience method to get this element as a primitive double.
| NumberFormatException | if the value contained is not a valid double. |
|
inline |
convenience method to get this element as a float.
| NumberFormatException | if the value contained is not a valid float. |
|
inline |
convenience method to get this element as a primitive integer.
| NumberFormatException | if the value contained is not a valid integer. |
|
inline |
convenience method to get this element as a primitive long.
| NumberFormatException | if the value contained is not a valid long. |
|
inline |
convenience method to get this element as a Number.
| NumberFormatException | if the value contained is not a valid Number. |
|
inline |
convenience method to get this element as a primitive short.
| NumberFormatException | if the value contained is not a valid short value. |
|
inline |
convenience method to get this element as a String.
|
inline |
|
inline |
Check whether this primitive contains a boolean value.
|
inlinestaticprivate |
Returns true if the specified number is an integral type (Long, Integer, Short, Byte, BigInteger)
|
inline |
Check whether this primitive contains a Number.
|
inlinestaticprivate |
|
inline |
Check whether this primitive contains a String value.
|
inlinepackage |
|
staticprivate |
|
private |
1.8.8