diff options
Diffstat (limited to 'gson/docs/javadocs/com/google/gson/JsonPrimitive.html')
-rw-r--r-- | gson/docs/javadocs/com/google/gson/JsonPrimitive.html | 741 |
1 files changed, 741 insertions, 0 deletions
diff --git a/gson/docs/javadocs/com/google/gson/JsonPrimitive.html b/gson/docs/javadocs/com/google/gson/JsonPrimitive.html new file mode 100644 index 00000000..79861db2 --- /dev/null +++ b/gson/docs/javadocs/com/google/gson/JsonPrimitive.html @@ -0,0 +1,741 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!--NewPage--> +<HTML> +<HEAD> +<!-- Generated by javadoc (build 1.6.0_65) on Thu Nov 20 01:11:55 PST 2014 --> +<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<TITLE> +JsonPrimitive (Gson 2.3.1 API) +</TITLE> + +<META NAME="date" CONTENT="2014-11-20"> + +<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> + +<SCRIPT type="text/javascript"> +function windowTitle() +{ + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="JsonPrimitive (Gson 2.3.1 API)"; + } +} +</SCRIPT> +<NOSCRIPT> +</NOSCRIPT> + +</HEAD> + +<BODY BGCOLOR="white" onload="windowTitle();"> +<HR> + + +<!-- ========= START OF TOP NAVBAR ======= --> +<A NAME="navbar_top"><!-- --></A> +<A HREF="#skip-navbar_top" title="Skip navigation links"></A> +<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> +<TR> +<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> +<A NAME="navbar_top_firstrow"><!-- --></A> +<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> + <TR ALIGN="center" VALIGN="top"> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> + <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/JsonPrimitive.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> + </TR> +</TABLE> +</TD> +<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> +</EM> +</TD> +</TR> + +<TR> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../com/google/gson/JsonParser.html" title="class in com.google.gson"><B>PREV CLASS</B></A> + <A HREF="../../../com/google/gson/JsonSerializationContext.html" title="interface in com.google.gson"><B>NEXT CLASS</B></A></FONT></TD> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../index.html?com/google/gson/JsonPrimitive.html" target="_top"><B>FRAMES</B></A> + <A HREF="JsonPrimitive.html" target="_top"><B>NO FRAMES</B></A> + <SCRIPT type="text/javascript"> + <!-- + if(window==top) { + document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); + } + //--> +</SCRIPT> +<NOSCRIPT> + <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> +</NOSCRIPT> + + +</FONT></TD> +</TR> +<TR> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> + SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> +DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> +</TR> +</TABLE> +<A NAME="skip-navbar_top"></A> +<!-- ========= END OF TOP NAVBAR ========= --> + +<HR> +<!-- ======== START OF CLASS DATA ======== --> +<H2> +<FONT SIZE="-1"> +com.google.gson</FONT> +<BR> +Class JsonPrimitive</H2> +<PRE> +<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A> + <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/google/gson/JsonElement.html" title="class in com.google.gson">com.google.gson.JsonElement</A> + <IMG SRC="../../../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 <A HREF="../../../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 + wrapper type. +<P> + +<P> +<DL> +<DT><B>Author:</B></DT> + <DD>Inderjeet Singh, Joel Leitch</DD> +</DL> +<HR> + +<P> + +<!-- ======== CONSTRUCTOR SUMMARY ======== --> + +<A NAME="constructor_summary"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> +<B>Constructor Summary</B></FONT></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#JsonPrimitive(java.lang.Boolean)">JsonPrimitive</A></B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</A> bool)</CODE> + +<BR> + Create a primitive containing a boolean value.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#JsonPrimitive(java.lang.Character)">JsonPrimitive</A></B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Character.html?is-external=true" title="class or interface in java.lang">Character</A> c)</CODE> + +<BR> + Create a primitive containing a character.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#JsonPrimitive(java.lang.Number)">JsonPrimitive</A></B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</A> number)</CODE> + +<BR> + Create a primitive containing a <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang"><CODE>Number</CODE></A>.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#JsonPrimitive(java.lang.String)">JsonPrimitive</A></B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> string)</CODE> + +<BR> + Create a primitive containing a String value.</TD> +</TR> +</TABLE> + +<!-- ========== METHOD SUMMARY =========== --> + +<A NAME="method_summary"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> +<B>Method Summary</B></FONT></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#equals(java.lang.Object)">equals</A></B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> obj)</CODE> + +<BR> + </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#getAsBigDecimal()">getAsBigDecimal</A></B>()</CODE> + +<BR> + convenience method to get this element as a <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><CODE>BigDecimal</CODE></A>.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#getAsBigInteger()">getAsBigInteger</A></B>()</CODE> + +<BR> + convenience method to get this element as a <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math"><CODE>BigInteger</CODE></A>.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#getAsBoolean()">getAsBoolean</A></B>()</CODE> + +<BR> + convenience method to get this element as a boolean value.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> byte</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#getAsByte()">getAsByte</A></B>()</CODE> + +<BR> + convenience method to get this element as a primitive byte value.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> char</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#getAsCharacter()">getAsCharacter</A></B>()</CODE> + +<BR> + convenience method to get this element as a primitive character value.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> double</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#getAsDouble()">getAsDouble</A></B>()</CODE> + +<BR> + convenience method to get this element as a primitive double.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> float</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#getAsFloat()">getAsFloat</A></B>()</CODE> + +<BR> + convenience method to get this element as a float.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#getAsInt()">getAsInt</A></B>()</CODE> + +<BR> + convenience method to get this element as a primitive integer.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> long</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#getAsLong()">getAsLong</A></B>()</CODE> + +<BR> + convenience method to get this element as a primitive long.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#getAsNumber()">getAsNumber</A></B>()</CODE> + +<BR> + convenience method to get this element as a Number.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> short</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#getAsShort()">getAsShort</A></B>()</CODE> + +<BR> + convenience method to get this element as a primitive short.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#getAsString()">getAsString</A></B>()</CODE> + +<BR> + convenience method to get this element as a String.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#hashCode()">hashCode</A></B>()</CODE> + +<BR> + </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#isBoolean()">isBoolean</A></B>()</CODE> + +<BR> + Check whether this primitive contains a boolean value.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#isNumber()">isNumber</A></B>()</CODE> + +<BR> + Check whether this primitive contains a Number.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/google/gson/JsonPrimitive.html#isString()">isString</A></B>()</CODE> + +<BR> + Check whether this primitive contains a String value.</TD> +</TR> +</TABLE> + <A NAME="methods_inherited_from_class_com.google.gson.JsonElement"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> +<TH ALIGN="left"><B>Methods inherited from class com.google.gson.<A HREF="../../../com/google/gson/JsonElement.html" title="class in com.google.gson">JsonElement</A></B></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE><A HREF="../../../com/google/gson/JsonElement.html#getAsJsonArray()">getAsJsonArray</A>, <A HREF="../../../com/google/gson/JsonElement.html#getAsJsonNull()">getAsJsonNull</A>, <A HREF="../../../com/google/gson/JsonElement.html#getAsJsonObject()">getAsJsonObject</A>, <A HREF="../../../com/google/gson/JsonElement.html#getAsJsonPrimitive()">getAsJsonPrimitive</A>, <A HREF="../../../com/google/gson/JsonElement.html#isJsonArray()">isJsonArray</A>, <A HREF="../../../com/google/gson/JsonElement.html#isJsonNull()">isJsonNull</A>, <A HREF="../../../com/google/gson/JsonElement.html#isJsonObject()">isJsonObject</A>, <A HREF="../../../com/google/gson/JsonElement.html#isJsonPrimitive()">isJsonPrimitive</A>, <A HREF="../../../com/google/gson/JsonElement.html#toString()">toString</A></CODE></TD> +</TR> +</TABLE> + <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> +<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/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> +</TR> +</TABLE> + +<P> + +<!-- ========= CONSTRUCTOR DETAIL ======== --> + +<A NAME="constructor_detail"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> +<B>Constructor Detail</B></FONT></TH> +</TR> +</TABLE> + +<A NAME="JsonPrimitive(java.lang.Boolean)"><!-- --></A><H3> +JsonPrimitive</H3> +<PRE> +public <B>JsonPrimitive</B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</A> bool)</PRE> +<DL> +<DD>Create a primitive containing a boolean value. +<P> +<DL> +<DT><B>Parameters:</B><DD><CODE>bool</CODE> - the value to create the primitive with.</DL> +</DL> +<HR> + +<A NAME="JsonPrimitive(java.lang.Number)"><!-- --></A><H3> +JsonPrimitive</H3> +<PRE> +public <B>JsonPrimitive</B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</A> number)</PRE> +<DL> +<DD>Create a primitive containing a <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang"><CODE>Number</CODE></A>. +<P> +<DL> +<DT><B>Parameters:</B><DD><CODE>number</CODE> - the value to create the primitive with.</DL> +</DL> +<HR> + +<A NAME="JsonPrimitive(java.lang.String)"><!-- --></A><H3> +JsonPrimitive</H3> +<PRE> +public <B>JsonPrimitive</B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> string)</PRE> +<DL> +<DD>Create a primitive containing a String value. +<P> +<DL> +<DT><B>Parameters:</B><DD><CODE>string</CODE> - the value to create the primitive with.</DL> +</DL> +<HR> + +<A NAME="JsonPrimitive(java.lang.Character)"><!-- --></A><H3> +JsonPrimitive</H3> +<PRE> +public <B>JsonPrimitive</B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Character.html?is-external=true" title="class or interface in java.lang">Character</A> c)</PRE> +<DL> +<DD>Create a primitive containing a character. The character is turned into a one character String + since Json only supports String. +<P> +<DL> +<DT><B>Parameters:</B><DD><CODE>c</CODE> - the value to create the primitive with.</DL> +</DL> + +<!-- ============ METHOD DETAIL ========== --> + +<A NAME="method_detail"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> +<B>Method Detail</B></FONT></TH> +</TR> +</TABLE> + +<A NAME="isBoolean()"><!-- --></A><H3> +isBoolean</H3> +<PRE> +public boolean <B>isBoolean</B>()</PRE> +<DL> +<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> + +<A NAME="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><A HREF="../../../com/google/gson/JsonElement.html#getAsBoolean()">getAsBoolean</A></CODE> in class <CODE><A HREF="../../../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.</DL> +</DD> +</DL> +<HR> + +<A NAME="isNumber()"><!-- --></A><H3> +isNumber</H3> +<PRE> +public boolean <B>isNumber</B>()</PRE> +<DL> +<DD>Check whether this primitive contains a Number. +<P> +<DD><DL> + +<DT><B>Returns:</B><DD>true if this primitive contains a Number, false otherwise.</DL> +</DD> +</DL> +<HR> + +<A NAME="getAsNumber()"><!-- --></A><H3> +getAsNumber</H3> +<PRE> +public <A HREF="http://docs.oracle.com/javase/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> +<DL> +<DD>convenience method to get this element as a Number. +<P> +<DD><DL> +<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/google/gson/JsonElement.html#getAsNumber()">getAsNumber</A></CODE> in class <CODE><A HREF="../../../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. +<DT><B>Throws:</B> +<DD><CODE><A HREF="http://docs.oracle.com/javase/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 Number.</DL> +</DD> +</DL> +<HR> + +<A NAME="isString()"><!-- --></A><H3> +isString</H3> +<PRE> +public boolean <B>isString</B>()</PRE> +<DL> +<DD>Check whether this primitive contains a String value. +<P> +<DD><DL> + +<DT><B>Returns:</B><DD>true if this primitive contains a String value, false otherwise.</DL> +</DD> +</DL> +<HR> + +<A NAME="getAsString()"><!-- --></A><H3> +getAsString</H3> +<PRE> +public <A HREF="http://docs.oracle.com/javase/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> +<DL> +<DD>convenience method to get this element as a String. +<P> +<DD><DL> +<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/google/gson/JsonElement.html#getAsString()">getAsString</A></CODE> in class <CODE><A HREF="../../../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.</DL> +</DD> +</DL> +<HR> + +<A NAME="getAsDouble()"><!-- --></A><H3> +getAsDouble</H3> +<PRE> +public double <B>getAsDouble</B>()</PRE> +<DL> +<DD>convenience method to get this element as a primitive double. +<P> +<DD><DL> +<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/google/gson/JsonElement.html#getAsDouble()">getAsDouble</A></CODE> in class <CODE><A HREF="../../../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. +<DT><B>Throws:</B> +<DD><CODE><A HREF="http://docs.oracle.com/javase/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 double.</DL> +</DD> +</DL> +<HR> + +<A NAME="getAsBigDecimal()"><!-- --></A><H3> +getAsBigDecimal</H3> +<PRE> +public <A HREF="http://docs.oracle.com/javase/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> +<DL> +<DD>convenience method to get this element as a <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><CODE>BigDecimal</CODE></A>. +<P> +<DD><DL> +<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/google/gson/JsonElement.html#getAsBigDecimal()">getAsBigDecimal</A></CODE> in class <CODE><A HREF="../../../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 <A HREF="http://docs.oracle.com/javase/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>Throws:</B> +<DD><CODE><A HREF="http://docs.oracle.com/javase/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 <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><CODE>BigDecimal</CODE></A>.</DL> +</DD> +</DL> +<HR> + +<A NAME="getAsBigInteger()"><!-- --></A><H3> +getAsBigInteger</H3> +<PRE> +public <A HREF="http://docs.oracle.com/javase/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> +<DL> +<DD>convenience method to get this element as a <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math"><CODE>BigInteger</CODE></A>. +<P> +<DD><DL> +<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/google/gson/JsonElement.html#getAsBigInteger()">getAsBigInteger</A></CODE> in class <CODE><A HREF="../../../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 <A HREF="http://docs.oracle.com/javase/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>Throws:</B> +<DD><CODE><A HREF="http://docs.oracle.com/javase/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 <A HREF="http://docs.oracle.com/javase/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> +</DL> +<HR> + +<A NAME="getAsFloat()"><!-- --></A><H3> +getAsFloat</H3> +<PRE> +public float <B>getAsFloat</B>()</PRE> +<DL> +<DD>convenience method to get this element as a float. +<P> +<DD><DL> +<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/google/gson/JsonElement.html#getAsFloat()">getAsFloat</A></CODE> in class <CODE><A HREF="../../../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. +<DT><B>Throws:</B> +<DD><CODE><A HREF="http://docs.oracle.com/javase/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 float.</DL> +</DD> +</DL> +<HR> + +<A NAME="getAsLong()"><!-- --></A><H3> +getAsLong</H3> +<PRE> +public long <B>getAsLong</B>()</PRE> +<DL> +<DD>convenience method to get this element as a primitive long. +<P> +<DD><DL> +<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/google/gson/JsonElement.html#getAsLong()">getAsLong</A></CODE> in class <CODE><A HREF="../../../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. +<DT><B>Throws:</B> +<DD><CODE><A HREF="http://docs.oracle.com/javase/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 long.</DL> +</DD> +</DL> +<HR> + +<A NAME="getAsShort()"><!-- --></A><H3> +getAsShort</H3> +<PRE> +public short <B>getAsShort</B>()</PRE> +<DL> +<DD>convenience method to get this element as a primitive short. +<P> +<DD><DL> +<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/google/gson/JsonElement.html#getAsShort()">getAsShort</A></CODE> in class <CODE><A HREF="../../../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. +<DT><B>Throws:</B> +<DD><CODE><A HREF="http://docs.oracle.com/javase/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 short value.</DL> +</DD> +</DL> +<HR> + +<A NAME="getAsInt()"><!-- --></A><H3> +getAsInt</H3> +<PRE> +public int <B>getAsInt</B>()</PRE> +<DL> +<DD>convenience method to get this element as a primitive integer. +<P> +<DD><DL> +<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/google/gson/JsonElement.html#getAsInt()">getAsInt</A></CODE> in class <CODE><A HREF="../../../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. +<DT><B>Throws:</B> +<DD><CODE><A HREF="http://docs.oracle.com/javase/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 integer.</DL> +</DD> +</DL> +<HR> + +<A NAME="getAsByte()"><!-- --></A><H3> +getAsByte</H3> +<PRE> +public byte <B>getAsByte</B>()</PRE> +<DL> +<DD><B>Description copied from class: <CODE><A HREF="../../../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><A HREF="../../../com/google/gson/JsonElement.html#getAsByte()">getAsByte</A></CODE> in class <CODE><A HREF="../../../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> + +<A NAME="getAsCharacter()"><!-- --></A><H3> +getAsCharacter</H3> +<PRE> +public char <B>getAsCharacter</B>()</PRE> +<DL> +<DD><B>Description copied from class: <CODE><A HREF="../../../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><A HREF="../../../com/google/gson/JsonElement.html#getAsCharacter()">getAsCharacter</A></CODE> in class <CODE><A HREF="../../../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> +</DD> +</DL> +<HR> + +<A NAME="hashCode()"><!-- --></A><H3> +hashCode</H3> +<PRE> +public int <B>hashCode</B>()</PRE> +<DL> +<DD><DL> +<DT><B>Overrides:</B><DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A></CODE> in class <CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL> +</DD> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="equals(java.lang.Object)"><!-- --></A><H3> +equals</H3> +<PRE> +public boolean <B>equals</B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> obj)</PRE> +<DL> +<DD><DL> +<DT><B>Overrides:</B><DD><CODE><A HREF="http://docs.oracle.com/javase/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></CODE> in class <CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL> +</DD> +<DD><DL> +</DL> +</DD> +</DL> +<!-- ========= END OF CLASS DATA ========= --> +<HR> + + +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<A NAME="navbar_bottom"><!-- --></A> +<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> +<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> +<TR> +<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> +<A NAME="navbar_bottom_firstrow"><!-- --></A> +<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> + <TR ALIGN="center" VALIGN="top"> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> + <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/JsonPrimitive.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> + </TR> +</TABLE> +</TD> +<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> +</EM> +</TD> +</TR> + +<TR> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../com/google/gson/JsonParser.html" title="class in com.google.gson"><B>PREV CLASS</B></A> + <A HREF="../../../com/google/gson/JsonSerializationContext.html" title="interface in com.google.gson"><B>NEXT CLASS</B></A></FONT></TD> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../index.html?com/google/gson/JsonPrimitive.html" target="_top"><B>FRAMES</B></A> + <A HREF="JsonPrimitive.html" target="_top"><B>NO FRAMES</B></A> + <SCRIPT type="text/javascript"> + <!-- + if(window==top) { + document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); + } + //--> +</SCRIPT> +<NOSCRIPT> + <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> +</NOSCRIPT> + + +</FONT></TD> +</TR> +<TR> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> + SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> +DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> +</TR> +</TABLE> +<A NAME="skip-navbar_bottom"></A> +<!-- ======== END OF BOTTOM NAVBAR ======= --> + +<HR> +Copyright © 2008–2014 <a href="http://www.google.com">Google, Inc.</a>. All rights reserved. +</BODY> +</HTML> |