Java com.google.gson JsonPrimitive fields, constructors, methods, implement or subclass

Example usage for Java com.google.gson JsonPrimitive fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.gson JsonPrimitive.

The text is from its open source code.

Constructor

JsonPrimitive(Boolean bool)
Create a primitive containing a boolean value.
JsonPrimitive(Number number)
Create a primitive containing a Number .
JsonPrimitive(String string)
Create a primitive containing a String value.
JsonPrimitive(Character c)
Create a primitive containing a character.

Method

JsonPrimitivedeepCopy()
Returns the same value as primitives are immutable.
booleanequals(Object obj)
BigDecimalgetAsBigDecimal()
convenience method to get this element as a BigDecimal .
BigIntegergetAsBigInteger()
convenience method to get this element as a BigInteger .
booleangetAsBoolean()
convenience method to get this element as a boolean value.
bytegetAsByte()
chargetAsCharacter()
doublegetAsDouble()
convenience method to get this element as a primitive double.
floatgetAsFloat()
convenience method to get this element as a float.
intgetAsInt()
convenience method to get this element as a primitive integer.
JsonArraygetAsJsonArray()
convenience method to get this element as a JsonArray .
longgetAsLong()
convenience method to get this element as a primitive long.
NumbergetAsNumber()
convenience method to get this element as a Number.
shortgetAsShort()
convenience method to get this element as a primitive short.
StringgetAsString()
convenience method to get this element as a String.
booleanisBoolean()
Check whether this primitive contains a boolean value.
booleanisJsonArray()
provides check for verifying if this element is an array or not.
booleanisJsonNull()
provides check for verifying if this element represents a null value or not.
booleanisNumber()
Check whether this primitive contains a Number.
booleanisString()
Check whether this primitive contains a String value.
StringtoString()
Returns a String representation of this element.