803 lines
44 KiB
HTML
803 lines
44 KiB
HTML
<!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:54 PST 2014 -->
|
|
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<TITLE>
|
|
JsonElement (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="JsonElement (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/JsonElement.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/JsonDeserializer.html" title="interface in com.google.gson"><B>PREV CLASS</B></A>
|
|
<A HREF="../../../com/google/gson/JsonIOException.html" title="class 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/JsonElement.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="JsonElement.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 JsonElement</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 "><B>com.google.gson.JsonElement</B>
|
|
</PRE>
|
|
<DL>
|
|
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson">JsonArray</A>, <A HREF="../../../com/google/gson/JsonNull.html" title="class in com.google.gson">JsonNull</A>, <A HREF="../../../com/google/gson/JsonObject.html" title="class in com.google.gson">JsonObject</A>, <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson">JsonPrimitive</A></DD>
|
|
</DL>
|
|
<HR>
|
|
<DL>
|
|
<DT><PRE>public abstract class <B>JsonElement</B><DT>extends <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></DL>
|
|
</PRE>
|
|
|
|
<P>
|
|
A class representing an element of Json. It could either be a <A HREF="../../../com/google/gson/JsonObject.html" title="class in com.google.gson"><CODE>JsonObject</CODE></A>, a
|
|
<A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson"><CODE>JsonArray</CODE></A>, a <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson"><CODE>JsonPrimitive</CODE></A> or a <A HREF="../../../com/google/gson/JsonNull.html" title="class in com.google.gson"><CODE>JsonNull</CODE></A>.
|
|
<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/JsonElement.html#JsonElement()">JsonElement</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</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> <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/JsonElement.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/JsonElement.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/JsonElement.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/JsonElement.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/JsonElement.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/JsonElement.html#getAsDouble()">getAsDouble</A></B>()</CODE>
|
|
|
|
<BR>
|
|
convenience method to get this element as a primitive double value.</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/JsonElement.html#getAsFloat()">getAsFloat</A></B>()</CODE>
|
|
|
|
<BR>
|
|
convenience method to get this element as a primitive float value.</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/JsonElement.html#getAsInt()">getAsInt</A></B>()</CODE>
|
|
|
|
<BR>
|
|
convenience method to get this element as a primitive integer value.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson">JsonArray</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/google/gson/JsonElement.html#getAsJsonArray()">getAsJsonArray</A></B>()</CODE>
|
|
|
|
<BR>
|
|
convenience method to get this element as a <A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson"><CODE>JsonArray</CODE></A>.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/google/gson/JsonNull.html" title="class in com.google.gson">JsonNull</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/google/gson/JsonElement.html#getAsJsonNull()">getAsJsonNull</A></B>()</CODE>
|
|
|
|
<BR>
|
|
convenience method to get this element as a <A HREF="../../../com/google/gson/JsonNull.html" title="class in com.google.gson"><CODE>JsonNull</CODE></A>.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/google/gson/JsonObject.html" title="class in com.google.gson">JsonObject</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/google/gson/JsonElement.html#getAsJsonObject()">getAsJsonObject</A></B>()</CODE>
|
|
|
|
<BR>
|
|
convenience method to get this element as a <A HREF="../../../com/google/gson/JsonObject.html" title="class in com.google.gson"><CODE>JsonObject</CODE></A>.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson">JsonPrimitive</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/google/gson/JsonElement.html#getAsJsonPrimitive()">getAsJsonPrimitive</A></B>()</CODE>
|
|
|
|
<BR>
|
|
convenience method to get this element as a <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson"><CODE>JsonPrimitive</CODE></A>.</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/JsonElement.html#getAsLong()">getAsLong</A></B>()</CODE>
|
|
|
|
<BR>
|
|
convenience method to get this element as a primitive long value.</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/JsonElement.html#getAsNumber()">getAsNumber</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/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 ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> short</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/google/gson/JsonElement.html#getAsShort()">getAsShort</A></B>()</CODE>
|
|
|
|
<BR>
|
|
convenience method to get this element as a primitive short value.</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/JsonElement.html#getAsString()">getAsString</A></B>()</CODE>
|
|
|
|
<BR>
|
|
convenience method to get this element as a string 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/JsonElement.html#isJsonArray()">isJsonArray</A></B>()</CODE>
|
|
|
|
<BR>
|
|
provides check for verifying if this element is an array or not.</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/JsonElement.html#isJsonNull()">isJsonNull</A></B>()</CODE>
|
|
|
|
<BR>
|
|
provides check for verifying if this element represents a null value or not.</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/JsonElement.html#isJsonObject()">isJsonObject</A></B>()</CODE>
|
|
|
|
<BR>
|
|
provides check for verifying if this element is a Json object or not.</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/JsonElement.html#isJsonPrimitive()">isJsonPrimitive</A></B>()</CODE>
|
|
|
|
<BR>
|
|
provides check for verifying if this element is a primitive or not.</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/JsonElement.html#toString()">toString</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns a String representation of this element.</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#equals(java.lang.Object)" title="class or interface in java.lang">equals</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#hashCode()" title="class or interface in java.lang">hashCode</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="JsonElement()"><!-- --></A><H3>
|
|
JsonElement</H3>
|
|
<PRE>
|
|
public <B>JsonElement</B>()</PRE>
|
|
<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="isJsonArray()"><!-- --></A><H3>
|
|
isJsonArray</H3>
|
|
<PRE>
|
|
public boolean <B>isJsonArray</B>()</PRE>
|
|
<DL>
|
|
<DD>provides check for verifying if this element is an array or not.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>true if this element is of type <A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson"><CODE>JsonArray</CODE></A>, false otherwise.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="isJsonObject()"><!-- --></A><H3>
|
|
isJsonObject</H3>
|
|
<PRE>
|
|
public boolean <B>isJsonObject</B>()</PRE>
|
|
<DL>
|
|
<DD>provides check for verifying if this element is a Json object or not.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>true if this element is of type <A HREF="../../../com/google/gson/JsonObject.html" title="class in com.google.gson"><CODE>JsonObject</CODE></A>, false otherwise.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="isJsonPrimitive()"><!-- --></A><H3>
|
|
isJsonPrimitive</H3>
|
|
<PRE>
|
|
public boolean <B>isJsonPrimitive</B>()</PRE>
|
|
<DL>
|
|
<DD>provides check for verifying if this element is a primitive or not.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>true if this element is of type <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson"><CODE>JsonPrimitive</CODE></A>, false otherwise.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="isJsonNull()"><!-- --></A><H3>
|
|
isJsonNull</H3>
|
|
<PRE>
|
|
public boolean <B>isJsonNull</B>()</PRE>
|
|
<DL>
|
|
<DD>provides check for verifying if this element represents a null value or not.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>true if this element is of type <A HREF="../../../com/google/gson/JsonNull.html" title="class in com.google.gson"><CODE>JsonNull</CODE></A>, false otherwise.<DT><B>Since:</B></DT>
|
|
<DD>1.2</DD>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getAsJsonObject()"><!-- --></A><H3>
|
|
getAsJsonObject</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/google/gson/JsonObject.html" title="class in com.google.gson">JsonObject</A> <B>getAsJsonObject</B>()</PRE>
|
|
<DL>
|
|
<DD>convenience method to get this element as a <A HREF="../../../com/google/gson/JsonObject.html" title="class in com.google.gson"><CODE>JsonObject</CODE></A>. If the element is of some
|
|
other type, a <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang"><CODE>IllegalStateException</CODE></A> will result. Hence it is best to use this method
|
|
after ensuring that this element is of the desired type by calling <A HREF="../../../com/google/gson/JsonElement.html#isJsonObject()"><CODE>isJsonObject()</CODE></A>
|
|
first.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>get this element as a <A HREF="../../../com/google/gson/JsonObject.html" title="class in com.google.gson"><CODE>JsonObject</CODE></A>.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the element is of another type.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getAsJsonArray()"><!-- --></A><H3>
|
|
getAsJsonArray</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson">JsonArray</A> <B>getAsJsonArray</B>()</PRE>
|
|
<DL>
|
|
<DD>convenience method to get this element as a <A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson"><CODE>JsonArray</CODE></A>. If the element is of some
|
|
other type, a <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang"><CODE>IllegalStateException</CODE></A> will result. Hence it is best to use this method
|
|
after ensuring that this element is of the desired type by calling <A HREF="../../../com/google/gson/JsonElement.html#isJsonArray()"><CODE>isJsonArray()</CODE></A>
|
|
first.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>get this element as a <A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson"><CODE>JsonArray</CODE></A>.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the element is of another type.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getAsJsonPrimitive()"><!-- --></A><H3>
|
|
getAsJsonPrimitive</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson">JsonPrimitive</A> <B>getAsJsonPrimitive</B>()</PRE>
|
|
<DL>
|
|
<DD>convenience method to get this element as a <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson"><CODE>JsonPrimitive</CODE></A>. If the element is of some
|
|
other type, a <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang"><CODE>IllegalStateException</CODE></A> will result. Hence it is best to use this method
|
|
after ensuring that this element is of the desired type by calling <A HREF="../../../com/google/gson/JsonElement.html#isJsonPrimitive()"><CODE>isJsonPrimitive()</CODE></A>
|
|
first.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>get this element as a <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson"><CODE>JsonPrimitive</CODE></A>.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the element is of another type.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getAsJsonNull()"><!-- --></A><H3>
|
|
getAsJsonNull</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/google/gson/JsonNull.html" title="class in com.google.gson">JsonNull</A> <B>getAsJsonNull</B>()</PRE>
|
|
<DL>
|
|
<DD>convenience method to get this element as a <A HREF="../../../com/google/gson/JsonNull.html" title="class in com.google.gson"><CODE>JsonNull</CODE></A>. If the element is of some
|
|
other type, a <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang"><CODE>IllegalStateException</CODE></A> will result. Hence it is best to use this method
|
|
after ensuring that this element is of the desired type by calling <A HREF="../../../com/google/gson/JsonElement.html#isJsonNull()"><CODE>isJsonNull()</CODE></A>
|
|
first.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>get this element as a <A HREF="../../../com/google/gson/JsonNull.html" title="class in com.google.gson"><CODE>JsonNull</CODE></A>.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the element is of another type.<DT><B>Since:</B></DT>
|
|
<DD>1.2</DD>
|
|
</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>Returns:</B><DD>get this element as a primitive boolean value.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</A></CODE> - if the element is of not a <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson"><CODE>JsonPrimitive</CODE></A> and is not a valid
|
|
boolean value.
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the element is of the type <A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson"><CODE>JsonArray</CODE></A> but contains
|
|
more than a single element.</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 <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>
|
|
<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/lang/Number.html?is-external=true" title="class or interface in java.lang"><CODE>Number</CODE></A>.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</A></CODE> - if the element is of not a <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson"><CODE>JsonPrimitive</CODE></A> and is not a valid
|
|
number.
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the element is of the type <A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson"><CODE>JsonArray</CODE></A> but contains
|
|
more than a single element.</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 value.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>get this element as a string value.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</A></CODE> - if the element is of not a <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson"><CODE>JsonPrimitive</CODE></A> and is not a valid
|
|
string value.
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the element is of the type <A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson"><CODE>JsonArray</CODE></A> but contains
|
|
more than a single element.</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 value.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>get this element as a primitive double value.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</A></CODE> - if the element is of not a <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson"><CODE>JsonPrimitive</CODE></A> and is not a valid
|
|
double value.
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the element is of the type <A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson"><CODE>JsonArray</CODE></A> but contains
|
|
more than a single element.</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 primitive float value.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>get this element as a primitive float value.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</A></CODE> - if the element is of not a <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson"><CODE>JsonPrimitive</CODE></A> and is not a valid
|
|
float value.
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the element is of the type <A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson"><CODE>JsonArray</CODE></A> but contains
|
|
more than a single element.</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 value.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>get this element as a primitive long value.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</A></CODE> - if the element is of not a <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson"><CODE>JsonPrimitive</CODE></A> and is not a valid
|
|
long value.
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the element is of the type <A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson"><CODE>JsonArray</CODE></A> but contains
|
|
more than a single element.</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 value.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>get this element as a primitive integer value.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</A></CODE> - if the element is of not a <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson"><CODE>JsonPrimitive</CODE></A> and is not a valid
|
|
integer value.
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the element is of the type <A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson"><CODE>JsonArray</CODE></A> but contains
|
|
more than a single element.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getAsByte()"><!-- --></A><H3>
|
|
getAsByte</H3>
|
|
<PRE>
|
|
public byte <B>getAsByte</B>()</PRE>
|
|
<DL>
|
|
<DD>convenience method to get this element as a primitive byte value.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>get this element as a primitive byte value.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</A></CODE> - if the element is of not a <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson"><CODE>JsonPrimitive</CODE></A> and is not a valid
|
|
byte value.
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the element is of the type <A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson"><CODE>JsonArray</CODE></A> but contains
|
|
more than a single element.<DT><B>Since:</B></DT>
|
|
<DD>1.3</DD>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getAsCharacter()"><!-- --></A><H3>
|
|
getAsCharacter</H3>
|
|
<PRE>
|
|
public char <B>getAsCharacter</B>()</PRE>
|
|
<DL>
|
|
<DD>convenience method to get this element as a primitive character value.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>get this element as a primitive char value.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</A></CODE> - if the element is of not a <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson"><CODE>JsonPrimitive</CODE></A> and is not a valid
|
|
char value.
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the element is of the type <A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson"><CODE>JsonArray</CODE></A> but contains
|
|
more than a single element.<DT><B>Since:</B></DT>
|
|
<DD>1.3</DD>
|
|
</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>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/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</A></CODE> - if the element is of not a <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson"><CODE>JsonPrimitive</CODE></A>.
|
|
* @throws NumberFormatException if the element 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>.
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the element is of the type <A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson"><CODE>JsonArray</CODE></A> but contains
|
|
more than a single element.<DT><B>Since:</B></DT>
|
|
<DD>1.2</DD>
|
|
</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>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/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</A></CODE> - if the element is of not a <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson"><CODE>JsonPrimitive</CODE></A>.
|
|
<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 element 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>.
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the element is of the type <A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson"><CODE>JsonArray</CODE></A> but contains
|
|
more than a single element.<DT><B>Since:</B></DT>
|
|
<DD>1.2</DD>
|
|
</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 value.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>get this element as a primitive short value.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</A></CODE> - if the element is of not a <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson"><CODE>JsonPrimitive</CODE></A> and is not a valid
|
|
short value.
|
|
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the element is of the type <A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson"><CODE>JsonArray</CODE></A> but contains
|
|
more than a single element.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="toString()"><!-- --></A><H3>
|
|
toString</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>toString</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns a String representation of this element.
|
|
<P>
|
|
<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#toString()" title="class or interface in java.lang">toString</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/JsonElement.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/JsonDeserializer.html" title="interface in com.google.gson"><B>PREV CLASS</B></A>
|
|
<A HREF="../../../com/google/gson/JsonIOException.html" title="class 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/JsonElement.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="JsonElement.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>
|