<IMGSRC="../../../resources/inherit.gif"ALT="extended by "><AHREF="../../../com/google/gson/JsonElement.html"title="class in com.google.gson">com.google.gson.JsonElement</A>
<IMGSRC="../../../resources/inherit.gif"ALT="extended by "><B>com.google.gson.JsonPrimitive</B>
</PRE>
<HR>
<DL>
<DT><PRE>public final class <B>JsonPrimitive</B><DT>extends <AHREF="../../../com/google/gson/JsonElement.html"title="class in com.google.gson">JsonElement</A></DL>
</PRE>
<P>
A class representing a Json primitive value. A primitive value
is either a String, a Java primitive, or a Java primitive
<TD><CODE><B><AHREF="../../../com/google/gson/JsonPrimitive.html#JsonPrimitive(java.lang.Boolean)">JsonPrimitive</A></B>(<AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Boolean.html?is-external=true"title="class or interface in java.lang">Boolean</A> bool)</CODE>
<TD><CODE><B><AHREF="../../../com/google/gson/JsonPrimitive.html#JsonPrimitive(java.lang.Character)">JsonPrimitive</A></B>(<AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Character.html?is-external=true"title="class or interface in java.lang">Character</A> c)</CODE>
<TD><CODE><B><AHREF="../../../com/google/gson/JsonPrimitive.html#JsonPrimitive(java.lang.Number)">JsonPrimitive</A></B>(<AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Number.html?is-external=true"title="class or interface in java.lang">Number</A> number)</CODE>
Create a primitive containing a <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Number.html?is-external=true"title="class or interface in java.lang"><CODE>Number</CODE></A>.</TD>
<TD><CODE><B><AHREF="../../../com/google/gson/JsonPrimitive.html#JsonPrimitive(java.lang.String)">JsonPrimitive</A></B>(<AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> string)</CODE>
<CODE> <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigDecimal.html?is-external=true"title="class or interface in java.math">BigDecimal</A></CODE></FONT></TD>
convenience method to get this element as a <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigDecimal.html?is-external=true"title="class or interface in java.math"><CODE>BigDecimal</CODE></A>.</TD>
<CODE> <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.html?is-external=true"title="class or interface in java.math">BigInteger</A></CODE></FONT></TD>
convenience method to get this element as a <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.html?is-external=true"title="class or interface in java.math"><CODE>BigInteger</CODE></A>.</TD>
<CODE> <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Number.html?is-external=true"title="class or interface in java.lang">Number</A></CODE></FONT></TD>
<CODE> <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<THALIGN="left"><B>Methods inherited from class com.google.gson.<AHREF="../../../com/google/gson/JsonElement.html"title="class in com.google.gson">JsonElement</A></B></TH>
<THALIGN="left"><B>Methods inherited from class java.lang.<AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A></B></TH>
<TD><CODE><AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)"title="class or interface in java.lang">equals</A>, <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()"title="class or interface in java.lang">getClass</A>, <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()"title="class or interface in java.lang">hashCode</A>, <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()"title="class or interface in java.lang">notify</A>, <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()"title="class or interface in java.lang">notifyAll</A>, <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()"title="class or interface in java.lang">wait</A>, <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)"title="class or interface in java.lang">wait</A>, <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)"title="class or interface in java.lang">wait</A></CODE></TD>
public <B>JsonPrimitive</B>(<AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Boolean.html?is-external=true"title="class or interface in java.lang">Boolean</A> bool)</PRE>
public <B>JsonPrimitive</B>(<AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Number.html?is-external=true"title="class or interface in java.lang">Number</A> number)</PRE>
<DD>Create a primitive containing a <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Number.html?is-external=true"title="class or interface in java.lang"><CODE>Number</CODE></A>.
public <B>JsonPrimitive</B>(<AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> string)</PRE>
public <B>JsonPrimitive</B>(<AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Character.html?is-external=true"title="class or interface in java.lang">Character</A> c)</PRE>
<DD>Check whether this primitive contains a boolean value.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>true if this primitive contains a boolean value, false otherwise.</DL>
</DD>
</DL>
<HR>
<ANAME="getAsBoolean()"><!----></A><H3>
getAsBoolean</H3>
<PRE>
public boolean <B>getAsBoolean</B>()</PRE>
<DL>
<DD>convenience method to get this element as a boolean value.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><AHREF="../../../com/google/gson/JsonElement.html#getAsBoolean()">getAsBoolean</A></CODE> in class <CODE><AHREF="../../../com/google/gson/JsonElement.html"title="class in com.google.gson">JsonElement</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>get this element as a primitive boolean value.
<DD><CODE><AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassCastException.html?is-external=true"title="class or interface in java.lang">ClassCastException</A></CODE> - if the value contained is not a valid boolean value.</DL>
public <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Number.html?is-external=true"title="class or interface in java.lang">Number</A><B>getAsNumber</B>()</PRE>
<DD>convenience method to get this element as a Number.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><AHREF="../../../com/google/gson/JsonElement.html#getAsNumber()">getAsNumber</A></CODE> in class <CODE><AHREF="../../../com/google/gson/JsonElement.html"title="class in com.google.gson">JsonElement</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>get this element as a Number.
<DD><CODE><AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassCastException.html?is-external=true"title="class or interface in java.lang">ClassCastException</A></CODE> - if the value contained is not a valid Number.</DL>
public <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>getAsString</B>()</PRE>
<DD>convenience method to get this element as a String.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><AHREF="../../../com/google/gson/JsonElement.html#getAsString()">getAsString</A></CODE> in class <CODE><AHREF="../../../com/google/gson/JsonElement.html"title="class in com.google.gson">JsonElement</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>get this element as a String.
<DD><CODE><AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassCastException.html?is-external=true"title="class or interface in java.lang">ClassCastException</A></CODE> - if the value contained is not a valid String.</DL>
<DD>convenience method to get this element as a primitive double.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><AHREF="../../../com/google/gson/JsonElement.html#getAsDouble()">getAsDouble</A></CODE> in class <CODE><AHREF="../../../com/google/gson/JsonElement.html"title="class in com.google.gson">JsonElement</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>get this element as a primitive double.
<DD><CODE><AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassCastException.html?is-external=true"title="class or interface in java.lang">ClassCastException</A></CODE> - if the value contained is not a valid double.</DL>
public <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigDecimal.html?is-external=true"title="class or interface in java.math">BigDecimal</A><B>getAsBigDecimal</B>()</PRE>
<DD>convenience method to get this element as a <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigDecimal.html?is-external=true"title="class or interface in java.math"><CODE>BigDecimal</CODE></A>.
<DT><B>Overrides:</B><DD><CODE><AHREF="../../../com/google/gson/JsonElement.html#getAsBigDecimal()">getAsBigDecimal</A></CODE> in class <CODE><AHREF="../../../com/google/gson/JsonElement.html"title="class in com.google.gson">JsonElement</A></CODE></DL>
<DT><B>Returns:</B><DD>get this element as a <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigDecimal.html?is-external=true"title="class or interface in java.math"><CODE>BigDecimal</CODE></A>.
<DD><CODE><AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NumberFormatException.html?is-external=true"title="class or interface in java.lang">NumberFormatException</A></CODE> - if the value contained is not a valid <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigDecimal.html?is-external=true"title="class or interface in java.math"><CODE>BigDecimal</CODE></A>.</DL>
public <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.html?is-external=true"title="class or interface in java.math">BigInteger</A><B>getAsBigInteger</B>()</PRE>
<DD>convenience method to get this element as a <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.html?is-external=true"title="class or interface in java.math"><CODE>BigInteger</CODE></A>.
<DT><B>Overrides:</B><DD><CODE><AHREF="../../../com/google/gson/JsonElement.html#getAsBigInteger()">getAsBigInteger</A></CODE> in class <CODE><AHREF="../../../com/google/gson/JsonElement.html"title="class in com.google.gson">JsonElement</A></CODE></DL>
<DT><B>Returns:</B><DD>get this element as a <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.html?is-external=true"title="class or interface in java.math"><CODE>BigInteger</CODE></A>.
<DD><CODE><AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NumberFormatException.html?is-external=true"title="class or interface in java.lang">NumberFormatException</A></CODE> - if the value contained is not a valid <AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.html?is-external=true"title="class or interface in java.math"><CODE>BigInteger</CODE></A>.</DL>
<DD>convenience method to get this element as a float.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><AHREF="../../../com/google/gson/JsonElement.html#getAsFloat()">getAsFloat</A></CODE> in class <CODE><AHREF="../../../com/google/gson/JsonElement.html"title="class in com.google.gson">JsonElement</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>get this element as a float.
<DD><CODE><AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassCastException.html?is-external=true"title="class or interface in java.lang">ClassCastException</A></CODE> - if the value contained is not a valid float.</DL>
<DD>convenience method to get this element as a primitive long.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><AHREF="../../../com/google/gson/JsonElement.html#getAsLong()">getAsLong</A></CODE> in class <CODE><AHREF="../../../com/google/gson/JsonElement.html"title="class in com.google.gson">JsonElement</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>get this element as a primitive long.
<DD><CODE><AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassCastException.html?is-external=true"title="class or interface in java.lang">ClassCastException</A></CODE> - if the value contained is not a valid long.</DL>
<DD>convenience method to get this element as a primitive short.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><AHREF="../../../com/google/gson/JsonElement.html#getAsShort()">getAsShort</A></CODE> in class <CODE><AHREF="../../../com/google/gson/JsonElement.html"title="class in com.google.gson">JsonElement</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>get this element as a primitive short.
<DD><CODE><AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassCastException.html?is-external=true"title="class or interface in java.lang">ClassCastException</A></CODE> - if the value contained is not a valid short value.</DL>
<DD>convenience method to get this element as a primitive integer.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><AHREF="../../../com/google/gson/JsonElement.html#getAsInt()">getAsInt</A></CODE> in class <CODE><AHREF="../../../com/google/gson/JsonElement.html"title="class in com.google.gson">JsonElement</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>get this element as a primitive integer.
<DD><CODE><AHREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassCastException.html?is-external=true"title="class or interface in java.lang">ClassCastException</A></CODE> - if the value contained is not a valid integer.</DL>
<DD><B>Description copied from class: <CODE><AHREF="../../../com/google/gson/JsonElement.html#getAsByte()">JsonElement</A></CODE></B></DD>
<DD>convenience method to get this element as a primitive byte value.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><AHREF="../../../com/google/gson/JsonElement.html#getAsByte()">getAsByte</A></CODE> in class <CODE><AHREF="../../../com/google/gson/JsonElement.html"title="class in com.google.gson">JsonElement</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>get this element as a primitive byte value.</DL>
</DD>
</DL>
<HR>
<ANAME="getAsCharacter()"><!----></A><H3>
getAsCharacter</H3>
<PRE>
public char <B>getAsCharacter</B>()</PRE>
<DL>
<DD><B>Description copied from class: <CODE><AHREF="../../../com/google/gson/JsonElement.html#getAsCharacter()">JsonElement</A></CODE></B></DD>
<DD>convenience method to get this element as a primitive character value.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><AHREF="../../../com/google/gson/JsonElement.html#getAsCharacter()">getAsCharacter</A></CODE> in class <CODE><AHREF="../../../com/google/gson/JsonElement.html"title="class in com.google.gson">JsonElement</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>get this element as a primitive char value.</DL>