2008-09-01 05:13:32 +02:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
< HTML >
< HEAD >
2009-01-12 18:28:53 +01:00
<!-- Generated by javadoc (build 1.5.0_13) on Mon Jan 12 09:24:22 PST 2009 -->
2008-09-01 05:13:32 +02:00
< TITLE >
2009-01-12 18:28:53 +01:00
JsonPrimitive
2008-09-01 05:13:32 +02:00
< / TITLE >
2008-10-14 00:36:54 +02:00
< META NAME = "keywords" CONTENT = "com.google.gson.JsonPrimitive class" >
2008-09-01 05:13:32 +02:00
< LINK REL = "stylesheet" TYPE = "text/css" HREF = "../../../stylesheet.css" TITLE = "Style" >
< SCRIPT type = "text/javascript" >
function windowTitle()
{
2009-01-12 18:28:53 +01:00
parent.document.title="JsonPrimitive";
2008-09-01 05:13:32 +02:00
}
< / SCRIPT >
< NOSCRIPT >
< / NOSCRIPT >
< / HEAD >
< BODY BGCOLOR = "white" onload = "windowTitle();" >
<!-- ========= 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 >
2009-01-12 18:28:53 +01:00
< TD BGCOLOR = "#EEEEFF" CLASS = "NavBarCell1" > < A HREF = "../../../index-files/index-1.html" > < FONT CLASS = "NavBarFont1" > < B > Index< / B > < / FONT > < / A > < / TD >
2008-09-01 05:13:32 +02:00
< 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/JsonParseException.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 >
2009-01-12 18:28:53 +01:00
java.lang.Object
2008-09-01 05:13:32 +02:00
< 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< / 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" >
2009-01-12 18:28:53 +01:00
< TD > < CODE > < B > < A HREF = "../../../com/google/gson/JsonPrimitive.html#JsonPrimitive(java.lang.Boolean)" > JsonPrimitive< / A > < / B > (java.lang.Boolean bool)< / CODE >
2008-09-01 05:13:32 +02:00
< BR >
Create a primitive containing a boolean value.< / TD >
< / TR >
< TR BGCOLOR = "white" CLASS = "TableRowColor" >
2009-01-12 18:28:53 +01:00
< TD > < CODE > < B > < A HREF = "../../../com/google/gson/JsonPrimitive.html#JsonPrimitive(java.lang.Character)" > JsonPrimitive< / A > < / B > (java.lang.Character c)< / CODE >
2008-09-01 05:13:32 +02:00
< BR >
Create a primitive containing a character.< / TD >
< / TR >
< TR BGCOLOR = "white" CLASS = "TableRowColor" >
2009-01-12 18:28:53 +01:00
< TD > < CODE > < B > < A HREF = "../../../com/google/gson/JsonPrimitive.html#JsonPrimitive(java.lang.Number)" > JsonPrimitive< / A > < / B > (java.lang.Number number)< / CODE >
2008-09-01 05:13:32 +02:00
< BR >
2009-01-12 18:28:53 +01:00
Create a primitive containing a < CODE > Number< / CODE > .< / TD >
2008-09-01 05:13:32 +02:00
< / TR >
< TR BGCOLOR = "white" CLASS = "TableRowColor" >
2009-01-12 18:28:53 +01:00
< TD > < CODE > < B > < A HREF = "../../../com/google/gson/JsonPrimitive.html#JsonPrimitive(java.lang.String)" > JsonPrimitive< / A > < / B > (java.lang.String string)< / CODE >
2008-09-01 05:13:32 +02:00
< 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" >
2009-01-12 18:28:53 +01:00
< CODE > java.math.BigDecimal< / CODE > < / FONT > < / TD >
2008-09-01 05:13:32 +02:00
< TD > < CODE > < B > < A HREF = "../../../com/google/gson/JsonPrimitive.html#getAsBigDecimal()" > getAsBigDecimal< / A > < / B > ()< / CODE >
< BR >
2009-01-12 18:28:53 +01:00
convenience method to get this element as a < CODE > BigDecimal< / CODE > .< / TD >
2008-09-01 05:13:32 +02:00
< / TR >
< TR BGCOLOR = "white" CLASS = "TableRowColor" >
< TD ALIGN = "right" VALIGN = "top" WIDTH = "1%" > < FONT SIZE = "-1" >
2009-01-12 18:28:53 +01:00
< CODE > java.math.BigInteger< / CODE > < / FONT > < / TD >
2008-09-01 05:13:32 +02:00
< TD > < CODE > < B > < A HREF = "../../../com/google/gson/JsonPrimitive.html#getAsBigInteger()" > getAsBigInteger< / A > < / B > ()< / CODE >
< BR >
2009-01-12 18:28:53 +01:00
convenience method to get this element as a < CODE > BigInteger< / CODE > .< / TD >
2008-09-01 05:13:32 +02:00
< / 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" >
2008-11-15 18:38:06 +01:00
< 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" >
2008-09-01 05:13:32 +02:00
< 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" >
2009-01-12 18:28:53 +01:00
< CODE > java.lang.Number< / CODE > < / FONT > < / TD >
2008-09-01 05:13:32 +02:00
< 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" >
2009-01-12 18:28:53 +01:00
< CODE > java.lang.String< / CODE > < / FONT > < / TD >
2008-09-01 05:13:32 +02:00
< 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 > 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" >
2009-01-12 18:28:53 +01:00
< TH ALIGN = "left" > < B > Methods inherited from class java.lang.Object< / B > < / TH >
2008-09-01 05:13:32 +02:00
< / TR >
< TR BGCOLOR = "white" CLASS = "TableRowColor" >
2009-01-12 18:28:53 +01:00
< TD > < CODE > equals, getClass, hashCode, notify, notifyAll, wait, wait, wait< / CODE > < / TD >
2008-09-01 05:13:32 +02:00
< / 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 >
2009-01-12 18:28:53 +01:00
public < B > JsonPrimitive< / B > (java.lang.Boolean bool)< / PRE >
2008-09-01 05:13:32 +02:00
< 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 >
2009-01-12 18:28:53 +01:00
public < B > JsonPrimitive< / B > (java.lang.Number number)< / PRE >
2008-09-01 05:13:32 +02:00
< DL >
2009-01-12 18:28:53 +01:00
< DD > Create a primitive containing a < CODE > Number< / CODE > .
2008-09-01 05:13:32 +02:00
< 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 >
2009-01-12 18:28:53 +01:00
public < B > JsonPrimitive< / B > (java.lang.String string)< / PRE >
2008-09-01 05:13:32 +02:00
< 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 >
2009-01-12 18:28:53 +01:00
public < B > JsonPrimitive< / B > (java.lang.Character c)< / PRE >
2008-09-01 05:13:32 +02:00
< 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.
< DT > < B > Throws:< / B >
2009-01-12 18:28:53 +01:00
< DD > < CODE > java.lang.ClassCastException< / CODE > - if the value contained is not a valid boolean value.< / DL >
2008-09-01 05:13:32 +02:00
< / 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 >
2009-01-12 18:28:53 +01:00
public java.lang.Number < B > getAsNumber< / B > ()< / PRE >
2008-09-01 05:13:32 +02:00
< 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 >
2009-01-12 18:28:53 +01:00
< DD > < CODE > java.lang.ClassCastException< / CODE > - if the value contained is not a valid Number.< / DL >
2008-09-01 05:13:32 +02:00
< / 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 >
2009-01-12 18:28:53 +01:00
public java.lang.String < B > getAsString< / B > ()< / PRE >
2008-09-01 05:13:32 +02:00
< 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.
< DT > < B > Throws:< / B >
2009-01-12 18:28:53 +01:00
< DD > < CODE > java.lang.ClassCastException< / CODE > - if the value contained is not a valid String.< / DL >
2008-09-01 05:13:32 +02:00
< / 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 >
2009-01-12 18:28:53 +01:00
< DD > < CODE > java.lang.ClassCastException< / CODE > - if the value contained is not a valid double.< / DL >
2008-09-01 05:13:32 +02:00
< / DD >
< / DL >
< HR >
< A NAME = "getAsBigDecimal()" > <!-- --> < / A > < H3 >
getAsBigDecimal< / H3 >
< PRE >
2009-01-12 18:28:53 +01:00
public java.math.BigDecimal < B > getAsBigDecimal< / B > ()< / PRE >
2008-09-01 05:13:32 +02:00
< DL >
2009-01-12 18:28:53 +01:00
< DD > convenience method to get this element as a < CODE > BigDecimal< / CODE > .
2008-09-01 05:13:32 +02:00
< 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 >
2009-01-12 18:28:53 +01:00
< DT > < B > Returns:< / B > < DD > get this element as a < CODE > BigDecimal< / CODE > .
2008-09-01 05:13:32 +02:00
< DT > < B > Throws:< / B >
2009-01-12 18:28:53 +01:00
< DD > < CODE > java.lang.NumberFormatException< / CODE > - if the value contained is not a valid < CODE > BigDecimal< / CODE > .< / DL >
2008-09-01 05:13:32 +02:00
< / DD >
< / DL >
< HR >
< A NAME = "getAsBigInteger()" > <!-- --> < / A > < H3 >
getAsBigInteger< / H3 >
< PRE >
2009-01-12 18:28:53 +01:00
public java.math.BigInteger < B > getAsBigInteger< / B > ()< / PRE >
2008-09-01 05:13:32 +02:00
< DL >
2009-01-12 18:28:53 +01:00
< DD > convenience method to get this element as a < CODE > BigInteger< / CODE > .
2008-09-01 05:13:32 +02:00
< 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 >
2009-01-12 18:28:53 +01:00
< DT > < B > Returns:< / B > < DD > get this element as a < CODE > BigInteger< / CODE > .
2008-09-01 05:13:32 +02:00
< DT > < B > Throws:< / B >
2009-01-12 18:28:53 +01:00
< DD > < CODE > java.lang.NumberFormatException< / CODE > - if the value contained is not a valid < CODE > BigInteger< / CODE > .< / DL >
2008-09-01 05:13:32 +02:00
< / 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 >
2009-01-12 18:28:53 +01:00
< DD > < CODE > java.lang.ClassCastException< / CODE > - if the value contained is not a valid float.< / DL >
2008-09-01 05:13:32 +02:00
< / 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 >
2009-01-12 18:28:53 +01:00
< DD > < CODE > java.lang.ClassCastException< / CODE > - if the value contained is not a valid long.< / DL >
2008-09-01 05:13:32 +02:00
< / 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 >
2009-01-12 18:28:53 +01:00
< DD > < CODE > java.lang.ClassCastException< / CODE > - if the value contained is not a valid short value.< / DL >
2008-09-01 05:13:32 +02:00
< / 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 >
2009-01-12 18:28:53 +01:00
< DD > < CODE > java.lang.ClassCastException< / CODE > - if the value contained is not a valid integer.< / DL >
2008-09-01 05:13:32 +02:00
< / DD >
< / DL >
2008-11-15 18:38:06 +01:00
< 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 >
2008-09-01 05:13:32 +02:00
<!-- ========= 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 >
2009-01-12 18:28:53 +01:00
< TD BGCOLOR = "#EEEEFF" CLASS = "NavBarCell1" > < A HREF = "../../../index-files/index-1.html" > < FONT CLASS = "NavBarFont1" > < B > Index< / B > < / FONT > < / A > < / TD >
2008-09-01 05:13:32 +02:00
< 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/JsonParseException.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 >
2009-01-12 18:28:53 +01:00
2008-09-01 05:13:32 +02:00
< / BODY >
< / HTML >