JSONArray.html 66 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- NewPage -->
  3. <html lang="en">
  4. <head>
  5. <!-- Generated by javadoc (1.8.0_161) on Thu Aug 16 18:54:13 JST 2018 -->
  6. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7. <title>JSONArray (twitter4j-core 4.0.7 API)</title>
  8. <meta name="date" content="2018-08-16">
  9. <link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
  10. <script type="text/javascript" src="../script.js"></script>
  11. </head>
  12. <body>
  13. <script type="text/javascript"><!--
  14. try {
  15. if (location.href.indexOf('is-external=true') == -1) {
  16. parent.document.title="JSONArray (twitter4j-core 4.0.7 API)";
  17. }
  18. }
  19. catch(err) {
  20. }
  21. //-->
  22. var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10};
  23. var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
  24. var altColor = "altColor";
  25. var rowColor = "rowColor";
  26. var tableTab = "tableTab";
  27. var activeTableTab = "activeTableTab";
  28. </script>
  29. <noscript>
  30. <div>JavaScript is disabled on your browser.</div>
  31. </noscript>
  32. <!-- ========= START OF TOP NAVBAR ======= -->
  33. <div class="topNav"><a name="navbar.top">
  34. <!-- -->
  35. </a>
  36. <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
  37. <a name="navbar.top.firstrow">
  38. <!-- -->
  39. </a>
  40. <ul class="navList" title="Navigation">
  41. <li><a href="../overview-summary.html">Overview</a></li>
  42. <li><a href="package-summary.html">Package</a></li>
  43. <li class="navBarCell1Rev">Class</li>
  44. <li><a href="class-use/JSONArray.html">Use</a></li>
  45. <li><a href="package-tree.html">Tree</a></li>
  46. <li><a href="../deprecated-list.html">Deprecated</a></li>
  47. <li><a href="../index-all.html">Index</a></li>
  48. <li><a href="../help-doc.html">Help</a></li>
  49. </ul>
  50. </div>
  51. <div class="subNav">
  52. <ul class="navList">
  53. <li><a href="../twitter4j/IDs.html" title="interface in twitter4j"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  54. <li><a href="../twitter4j/JSONException.html" title="class in twitter4j"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  55. </ul>
  56. <ul class="navList">
  57. <li><a href="../index.html?twitter4j/JSONArray.html" target="_top">Frames</a></li>
  58. <li><a href="JSONArray.html" target="_top">No&nbsp;Frames</a></li>
  59. </ul>
  60. <ul class="navList" id="allclasses_navbar_top">
  61. <li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li>
  62. </ul>
  63. <div>
  64. <script type="text/javascript"><!--
  65. allClassesLink = document.getElementById("allclasses_navbar_top");
  66. if(window==top) {
  67. allClassesLink.style.display = "block";
  68. }
  69. else {
  70. allClassesLink.style.display = "none";
  71. }
  72. //-->
  73. </script>
  74. </div>
  75. <div>
  76. <ul class="subNavList">
  77. <li>Summary:&nbsp;</li>
  78. <li>Nested&nbsp;|&nbsp;</li>
  79. <li>Field&nbsp;|&nbsp;</li>
  80. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  81. <li><a href="#method.summary">Method</a></li>
  82. </ul>
  83. <ul class="subNavList">
  84. <li>Detail:&nbsp;</li>
  85. <li>Field&nbsp;|&nbsp;</li>
  86. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  87. <li><a href="#method.detail">Method</a></li>
  88. </ul>
  89. </div>
  90. <a name="skip.navbar.top">
  91. <!-- -->
  92. </a></div>
  93. <!-- ========= END OF TOP NAVBAR ========= -->
  94. <!-- ======== START OF CLASS DATA ======== -->
  95. <div class="header">
  96. <div class="subTitle">twitter4j</div>
  97. <h2 title="Class JSONArray" class="title">Class JSONArray</h2>
  98. </div>
  99. <div class="contentContainer">
  100. <ul class="inheritance">
  101. <li><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
  102. <li>
  103. <ul class="inheritance">
  104. <li>twitter4j.JSONArray</li>
  105. </ul>
  106. </li>
  107. </ul>
  108. <div class="description">
  109. <ul class="blockList">
  110. <li class="blockList">
  111. <hr>
  112. <br>
  113. <pre>public class <span class="typeNameLabel">JSONArray</span>
  114. extends <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
  115. <div class="block">A dense indexed sequence of values. Values may be any mix of
  116. <a href="../twitter4j/JSONObject.html" title="class in twitter4j"><code>JSONObjects</code></a>, other <a href="../twitter4j/JSONArray.html" title="class in twitter4j"><code>JSONArrays</code></a>, Strings,
  117. Booleans, Integers, Longs, Doubles, <code>null</code> or <a href="../twitter4j/JSONObject.html#NULL"><code>JSONObject.NULL</code></a>.
  118. Values may not be <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#isNaN--" title="class or interface in java.lang"><code>NaNs</code></a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#isInfinite--" title="class or interface in java.lang"><code>infinities</code></a>, or of any type not listed here.
  119. <code>JSONArray</code> has the same type coercion behavior and
  120. optional/mandatory accessors as <a href="../twitter4j/JSONObject.html" title="class in twitter4j"><code>JSONObject</code></a>. See that class'
  121. documentation for details.
  122. <strong>Warning:</strong> this class represents null in two incompatible
  123. ways: the standard Java <code>null</code> reference, and the sentinel value <a href="../twitter4j/JSONObject.html#NULL"><code>JSONObject.NULL</code></a>. In particular, <code>get</code> fails if the requested index
  124. holds the null reference, but succeeds if it holds <code>JSONObject.NULL</code>.
  125. Instances of this class are not thread safe. Although this class is
  126. non-final, it was not designed for inheritance and should not be subclassed.
  127. In particular, self-use by overridable methods is not specified. See
  128. <i>Effective Java</i> Item 17, "Design and Document or inheritance or else
  129. prohibit it" for further information.</div>
  130. </li>
  131. </ul>
  132. </div>
  133. <div class="summary">
  134. <ul class="blockList">
  135. <li class="blockList">
  136. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  137. <ul class="blockList">
  138. <li class="blockList"><a name="constructor.summary">
  139. <!-- -->
  140. </a>
  141. <h3>Constructor Summary</h3>
  142. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  143. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  144. <tr>
  145. <th class="colOne" scope="col">Constructor and Description</th>
  146. </tr>
  147. <tr class="altColor">
  148. <td class="colOne"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#JSONArray--">JSONArray</a></span>()</code>
  149. <div class="block">Creates a <code>JSONArray</code> with no values.</div>
  150. </td>
  151. </tr>
  152. <tr class="rowColor">
  153. <td class="colOne"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#JSONArray-java.util.Collection-">JSONArray</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;copyFrom)</code>
  154. <div class="block">Creates a new <code>JSONArray</code> by copying all values from the given
  155. collection.</div>
  156. </td>
  157. </tr>
  158. <tr class="altColor">
  159. <td class="colOne"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#JSONArray-twitter4j.JSONTokener-">JSONArray</a></span>(<a href="../twitter4j/JSONTokener.html" title="class in twitter4j">JSONTokener</a>&nbsp;readFrom)</code>
  160. <div class="block">Creates a new <code>JSONArray</code> with values from the next array in the
  161. tokener.</div>
  162. </td>
  163. </tr>
  164. <tr class="rowColor">
  165. <td class="colOne"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#JSONArray-java.lang.Object-">JSONArray</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;array)</code>
  166. <div class="block">Creates a new <code>JSONArray</code> with values from the given primitive array.</div>
  167. </td>
  168. </tr>
  169. <tr class="altColor">
  170. <td class="colOne"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#JSONArray-java.lang.String-">JSONArray</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;json)</code>
  171. <div class="block">Creates a new <code>JSONArray</code> with values from the JSON string.</div>
  172. </td>
  173. </tr>
  174. </table>
  175. </li>
  176. </ul>
  177. <!-- ========== METHOD SUMMARY =========== -->
  178. <ul class="blockList">
  179. <li class="blockList"><a name="method.summary">
  180. <!-- -->
  181. </a>
  182. <h3>Method Summary</h3>
  183. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  184. <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  185. <tr>
  186. <th class="colFirst" scope="col">Modifier and Type</th>
  187. <th class="colLast" scope="col">Method and Description</th>
  188. </tr>
  189. <tr id="i0" class="altColor">
  190. <td class="colFirst"><code>boolean</code></td>
  191. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#equals-java.lang.Object-">equals</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;o)</code>&nbsp;</td>
  192. </tr>
  193. <tr id="i1" class="rowColor">
  194. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
  195. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#get-int-">get</a></span>(int&nbsp;index)</code>
  196. <div class="block">Returns the value at <code>index</code>.</div>
  197. </td>
  198. </tr>
  199. <tr id="i2" class="altColor">
  200. <td class="colFirst"><code>boolean</code></td>
  201. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#getBoolean-int-">getBoolean</a></span>(int&nbsp;index)</code>
  202. <div class="block">Returns the value at <code>index</code> if it exists and is a boolean or can
  203. be coerced to a boolean.</div>
  204. </td>
  205. </tr>
  206. <tr id="i3" class="rowColor">
  207. <td class="colFirst"><code>double</code></td>
  208. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#getDouble-int-">getDouble</a></span>(int&nbsp;index)</code>
  209. <div class="block">Returns the value at <code>index</code> if it exists and is a double or can
  210. be coerced to a double.</div>
  211. </td>
  212. </tr>
  213. <tr id="i4" class="altColor">
  214. <td class="colFirst"><code>int</code></td>
  215. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#getInt-int-">getInt</a></span>(int&nbsp;index)</code>
  216. <div class="block">Returns the value at <code>index</code> if it exists and is an int or
  217. can be coerced to an int.</div>
  218. </td>
  219. </tr>
  220. <tr id="i5" class="rowColor">
  221. <td class="colFirst"><code><a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a></code></td>
  222. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#getJSONArray-int-">getJSONArray</a></span>(int&nbsp;index)</code>
  223. <div class="block">Returns the value at <code>index</code> if it exists and is a <code>JSONArray</code>.</div>
  224. </td>
  225. </tr>
  226. <tr id="i6" class="altColor">
  227. <td class="colFirst"><code><a href="../twitter4j/JSONObject.html" title="class in twitter4j">JSONObject</a></code></td>
  228. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#getJSONObject-int-">getJSONObject</a></span>(int&nbsp;index)</code>
  229. <div class="block">Returns the value at <code>index</code> if it exists and is a <code>JSONObject</code>.</div>
  230. </td>
  231. </tr>
  232. <tr id="i7" class="rowColor">
  233. <td class="colFirst"><code>long</code></td>
  234. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#getLong-int-">getLong</a></span>(int&nbsp;index)</code>
  235. <div class="block">Returns the value at <code>index</code> if it exists and is a long or
  236. can be coerced to a long.</div>
  237. </td>
  238. </tr>
  239. <tr id="i8" class="altColor">
  240. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  241. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#getString-int-">getString</a></span>(int&nbsp;index)</code>
  242. <div class="block">Returns the value at <code>index</code> if it exists, coercing it if
  243. necessary.</div>
  244. </td>
  245. </tr>
  246. <tr id="i9" class="rowColor">
  247. <td class="colFirst"><code>int</code></td>
  248. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#hashCode--">hashCode</a></span>()</code>&nbsp;</td>
  249. </tr>
  250. <tr id="i10" class="altColor">
  251. <td class="colFirst"><code>boolean</code></td>
  252. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#isNull-int-">isNull</a></span>(int&nbsp;index)</code>
  253. <div class="block">Returns true if this array has no value at <code>index</code>, or if its value
  254. is the <code>null</code> reference or <a href="../twitter4j/JSONObject.html#NULL"><code>JSONObject.NULL</code></a>.</div>
  255. </td>
  256. </tr>
  257. <tr id="i11" class="rowColor">
  258. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  259. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#join-java.lang.String-">join</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;separator)</code>
  260. <div class="block">Returns a new string by alternating this array's values with <code>separator</code>.</div>
  261. </td>
  262. </tr>
  263. <tr id="i12" class="altColor">
  264. <td class="colFirst"><code>int</code></td>
  265. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#length--">length</a></span>()</code>&nbsp;</td>
  266. </tr>
  267. <tr id="i13" class="rowColor">
  268. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
  269. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#opt-int-">opt</a></span>(int&nbsp;index)</code>
  270. <div class="block">Returns the value at <code>index</code>, or null if the array has no value
  271. at <code>index</code>.</div>
  272. </td>
  273. </tr>
  274. <tr id="i14" class="altColor">
  275. <td class="colFirst"><code>boolean</code></td>
  276. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#optBoolean-int-">optBoolean</a></span>(int&nbsp;index)</code>
  277. <div class="block">Returns the value at <code>index</code> if it exists and is a boolean or can
  278. be coerced to a boolean.</div>
  279. </td>
  280. </tr>
  281. <tr id="i15" class="rowColor">
  282. <td class="colFirst"><code>boolean</code></td>
  283. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#optBoolean-int-boolean-">optBoolean</a></span>(int&nbsp;index,
  284. boolean&nbsp;fallback)</code>
  285. <div class="block">Returns the value at <code>index</code> if it exists and is a boolean or can
  286. be coerced to a boolean.</div>
  287. </td>
  288. </tr>
  289. <tr id="i16" class="altColor">
  290. <td class="colFirst"><code>double</code></td>
  291. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#optDouble-int-">optDouble</a></span>(int&nbsp;index)</code>
  292. <div class="block">Returns the value at <code>index</code> if it exists and is a double or can
  293. be coerced to a double.</div>
  294. </td>
  295. </tr>
  296. <tr id="i17" class="rowColor">
  297. <td class="colFirst"><code>double</code></td>
  298. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#optDouble-int-double-">optDouble</a></span>(int&nbsp;index,
  299. double&nbsp;fallback)</code>
  300. <div class="block">Returns the value at <code>index</code> if it exists and is a double or can
  301. be coerced to a double.</div>
  302. </td>
  303. </tr>
  304. <tr id="i18" class="altColor">
  305. <td class="colFirst"><code>int</code></td>
  306. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#optInt-int-">optInt</a></span>(int&nbsp;index)</code>
  307. <div class="block">Returns the value at <code>index</code> if it exists and is an int or
  308. can be coerced to an int.</div>
  309. </td>
  310. </tr>
  311. <tr id="i19" class="rowColor">
  312. <td class="colFirst"><code>int</code></td>
  313. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#optInt-int-int-">optInt</a></span>(int&nbsp;index,
  314. int&nbsp;fallback)</code>
  315. <div class="block">Returns the value at <code>index</code> if it exists and is an int or
  316. can be coerced to an int.</div>
  317. </td>
  318. </tr>
  319. <tr id="i20" class="altColor">
  320. <td class="colFirst"><code><a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a></code></td>
  321. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#optJSONArray-int-">optJSONArray</a></span>(int&nbsp;index)</code>
  322. <div class="block">Returns the value at <code>index</code> if it exists and is a <code>JSONArray</code>.</div>
  323. </td>
  324. </tr>
  325. <tr id="i21" class="rowColor">
  326. <td class="colFirst"><code><a href="../twitter4j/JSONObject.html" title="class in twitter4j">JSONObject</a></code></td>
  327. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#optJSONObject-int-">optJSONObject</a></span>(int&nbsp;index)</code>
  328. <div class="block">Returns the value at <code>index</code> if it exists and is a <code>JSONObject</code>.</div>
  329. </td>
  330. </tr>
  331. <tr id="i22" class="altColor">
  332. <td class="colFirst"><code>long</code></td>
  333. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#optLong-int-">optLong</a></span>(int&nbsp;index)</code>
  334. <div class="block">Returns the value at <code>index</code> if it exists and is a long or
  335. can be coerced to a long.</div>
  336. </td>
  337. </tr>
  338. <tr id="i23" class="rowColor">
  339. <td class="colFirst"><code>long</code></td>
  340. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#optLong-int-long-">optLong</a></span>(int&nbsp;index,
  341. long&nbsp;fallback)</code>
  342. <div class="block">Returns the value at <code>index</code> if it exists and is a long or
  343. can be coerced to a long.</div>
  344. </td>
  345. </tr>
  346. <tr id="i24" class="altColor">
  347. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  348. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#optString-int-">optString</a></span>(int&nbsp;index)</code>
  349. <div class="block">Returns the value at <code>index</code> if it exists, coercing it if
  350. necessary.</div>
  351. </td>
  352. </tr>
  353. <tr id="i25" class="rowColor">
  354. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  355. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#optString-int-java.lang.String-">optString</a></span>(int&nbsp;index,
  356. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;fallback)</code>
  357. <div class="block">Returns the value at <code>index</code> if it exists, coercing it if
  358. necessary.</div>
  359. </td>
  360. </tr>
  361. <tr id="i26" class="altColor">
  362. <td class="colFirst"><code><a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a></code></td>
  363. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#put-boolean-">put</a></span>(boolean&nbsp;value)</code>
  364. <div class="block">Appends <code>value</code> to the end of this array.</div>
  365. </td>
  366. </tr>
  367. <tr id="i27" class="rowColor">
  368. <td class="colFirst"><code><a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a></code></td>
  369. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#put-double-">put</a></span>(double&nbsp;value)</code>
  370. <div class="block">Appends <code>value</code> to the end of this array.</div>
  371. </td>
  372. </tr>
  373. <tr id="i28" class="altColor">
  374. <td class="colFirst"><code><a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a></code></td>
  375. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#put-int-">put</a></span>(int&nbsp;value)</code>
  376. <div class="block">Appends <code>value</code> to the end of this array.</div>
  377. </td>
  378. </tr>
  379. <tr id="i29" class="rowColor">
  380. <td class="colFirst"><code><a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a></code></td>
  381. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#put-int-boolean-">put</a></span>(int&nbsp;index,
  382. boolean&nbsp;value)</code>
  383. <div class="block">Sets the value at <code>index</code> to <code>value</code>, null padding this array
  384. to the required length if necessary.</div>
  385. </td>
  386. </tr>
  387. <tr id="i30" class="altColor">
  388. <td class="colFirst"><code><a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a></code></td>
  389. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#put-int-double-">put</a></span>(int&nbsp;index,
  390. double&nbsp;value)</code>
  391. <div class="block">Sets the value at <code>index</code> to <code>value</code>, null padding this array
  392. to the required length if necessary.</div>
  393. </td>
  394. </tr>
  395. <tr id="i31" class="rowColor">
  396. <td class="colFirst"><code><a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a></code></td>
  397. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#put-int-int-">put</a></span>(int&nbsp;index,
  398. int&nbsp;value)</code>
  399. <div class="block">Sets the value at <code>index</code> to <code>value</code>, null padding this array
  400. to the required length if necessary.</div>
  401. </td>
  402. </tr>
  403. <tr id="i32" class="altColor">
  404. <td class="colFirst"><code><a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a></code></td>
  405. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#put-int-long-">put</a></span>(int&nbsp;index,
  406. long&nbsp;value)</code>
  407. <div class="block">Sets the value at <code>index</code> to <code>value</code>, null padding this array
  408. to the required length if necessary.</div>
  409. </td>
  410. </tr>
  411. <tr id="i33" class="rowColor">
  412. <td class="colFirst"><code><a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a></code></td>
  413. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#put-int-java.lang.Object-">put</a></span>(int&nbsp;index,
  414. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;value)</code>
  415. <div class="block">Sets the value at <code>index</code> to <code>value</code>, null padding this array
  416. to the required length if necessary.</div>
  417. </td>
  418. </tr>
  419. <tr id="i34" class="altColor">
  420. <td class="colFirst"><code><a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a></code></td>
  421. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#put-long-">put</a></span>(long&nbsp;value)</code>
  422. <div class="block">Appends <code>value</code> to the end of this array.</div>
  423. </td>
  424. </tr>
  425. <tr id="i35" class="rowColor">
  426. <td class="colFirst"><code><a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a></code></td>
  427. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#put-java.lang.Object-">put</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;value)</code>
  428. <div class="block">Appends <code>value</code> to the end of this array.</div>
  429. </td>
  430. </tr>
  431. <tr id="i36" class="altColor">
  432. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
  433. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#remove-int-">remove</a></span>(int&nbsp;index)</code>
  434. <div class="block">Removes and returns the value at <code>index</code>, or null if the array has no value
  435. at <code>index</code>.</div>
  436. </td>
  437. </tr>
  438. <tr id="i37" class="rowColor">
  439. <td class="colFirst"><code><a href="../twitter4j/JSONObject.html" title="class in twitter4j">JSONObject</a></code></td>
  440. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#toJSONObject-twitter4j.JSONArray-">toJSONObject</a></span>(<a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a>&nbsp;names)</code>
  441. <div class="block">Returns a new object whose values are the values in this array, and whose
  442. names are the values in <code>names</code>.</div>
  443. </td>
  444. </tr>
  445. <tr id="i38" class="altColor">
  446. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  447. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#toString--">toString</a></span>()</code>
  448. <div class="block">Encodes this array as a compact JSON string, such as:</div>
  449. </td>
  450. </tr>
  451. <tr id="i39" class="rowColor">
  452. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  453. <td class="colLast"><code><span class="memberNameLink"><a href="../twitter4j/JSONArray.html#toString-int-">toString</a></span>(int&nbsp;indentSpaces)</code>
  454. <div class="block">Encodes this array as a human readable JSON string for debugging, such
  455. as:</div>
  456. </td>
  457. </tr>
  458. </table>
  459. <ul class="blockList">
  460. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  461. <!-- -->
  462. </a>
  463. <h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
  464. <code><a href="http://docs.oracle.com/javase/8/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/8/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/8/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/8/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/8/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/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
  465. </ul>
  466. </li>
  467. </ul>
  468. </li>
  469. </ul>
  470. </div>
  471. <div class="details">
  472. <ul class="blockList">
  473. <li class="blockList">
  474. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  475. <ul class="blockList">
  476. <li class="blockList"><a name="constructor.detail">
  477. <!-- -->
  478. </a>
  479. <h3>Constructor Detail</h3>
  480. <a name="JSONArray--">
  481. <!-- -->
  482. </a>
  483. <ul class="blockList">
  484. <li class="blockList">
  485. <h4>JSONArray</h4>
  486. <pre>public&nbsp;JSONArray()</pre>
  487. <div class="block">Creates a <code>JSONArray</code> with no values.</div>
  488. </li>
  489. </ul>
  490. <a name="JSONArray-java.util.Collection-">
  491. <!-- -->
  492. </a>
  493. <ul class="blockList">
  494. <li class="blockList">
  495. <h4>JSONArray</h4>
  496. <pre>public&nbsp;JSONArray(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;copyFrom)</pre>
  497. <div class="block">Creates a new <code>JSONArray</code> by copying all values from the given
  498. collection.</div>
  499. <dl>
  500. <dt><span class="paramLabel">Parameters:</span></dt>
  501. <dd><code>copyFrom</code> - a collection whose values are of supported types.
  502. Unsupported values are not permitted and will yield an array in an
  503. inconsistent state.</dd>
  504. </dl>
  505. </li>
  506. </ul>
  507. <a name="JSONArray-twitter4j.JSONTokener-">
  508. <!-- -->
  509. </a>
  510. <ul class="blockList">
  511. <li class="blockList">
  512. <h4>JSONArray</h4>
  513. <pre>public&nbsp;JSONArray(<a href="../twitter4j/JSONTokener.html" title="class in twitter4j">JSONTokener</a>&nbsp;readFrom)
  514. throws <a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></pre>
  515. <div class="block">Creates a new <code>JSONArray</code> with values from the next array in the
  516. tokener.</div>
  517. <dl>
  518. <dt><span class="paramLabel">Parameters:</span></dt>
  519. <dd><code>readFrom</code> - a tokener whose nextValue() method will yield a
  520. <code>JSONArray</code>.</dd>
  521. <dt><span class="throwsLabel">Throws:</span></dt>
  522. <dd><code><a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></code> - if the parse fails or doesn't yield a
  523. <code>JSONArray</code>.</dd>
  524. </dl>
  525. </li>
  526. </ul>
  527. <a name="JSONArray-java.lang.String-">
  528. <!-- -->
  529. </a>
  530. <ul class="blockList">
  531. <li class="blockList">
  532. <h4>JSONArray</h4>
  533. <pre>public&nbsp;JSONArray(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;json)
  534. throws <a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></pre>
  535. <div class="block">Creates a new <code>JSONArray</code> with values from the JSON string.</div>
  536. <dl>
  537. <dt><span class="paramLabel">Parameters:</span></dt>
  538. <dd><code>json</code> - a JSON-encoded string containing an array.</dd>
  539. <dt><span class="throwsLabel">Throws:</span></dt>
  540. <dd><code><a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></code> - if the parse fails or doesn't yield a <code>JSONArray</code>.</dd>
  541. </dl>
  542. </li>
  543. </ul>
  544. <a name="JSONArray-java.lang.Object-">
  545. <!-- -->
  546. </a>
  547. <ul class="blockListLast">
  548. <li class="blockList">
  549. <h4>JSONArray</h4>
  550. <pre>public&nbsp;JSONArray(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;array)
  551. throws <a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></pre>
  552. <div class="block">Creates a new <code>JSONArray</code> with values from the given primitive array.</div>
  553. <dl>
  554. <dt><span class="paramLabel">Parameters:</span></dt>
  555. <dd><code>array</code> - The values to use.</dd>
  556. <dt><span class="throwsLabel">Throws:</span></dt>
  557. <dd><code><a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></code> - if any of the values are non-finite double values (i.e. NaN or infinite)</dd>
  558. </dl>
  559. </li>
  560. </ul>
  561. </li>
  562. </ul>
  563. <!-- ============ METHOD DETAIL ========== -->
  564. <ul class="blockList">
  565. <li class="blockList"><a name="method.detail">
  566. <!-- -->
  567. </a>
  568. <h3>Method Detail</h3>
  569. <a name="length--">
  570. <!-- -->
  571. </a>
  572. <ul class="blockList">
  573. <li class="blockList">
  574. <h4>length</h4>
  575. <pre>public&nbsp;int&nbsp;length()</pre>
  576. <dl>
  577. <dt><span class="returnLabel">Returns:</span></dt>
  578. <dd>Returns the number of values in this array.</dd>
  579. </dl>
  580. </li>
  581. </ul>
  582. <a name="put-boolean-">
  583. <!-- -->
  584. </a>
  585. <ul class="blockList">
  586. <li class="blockList">
  587. <h4>put</h4>
  588. <pre>public&nbsp;<a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a>&nbsp;put(boolean&nbsp;value)</pre>
  589. <div class="block">Appends <code>value</code> to the end of this array.</div>
  590. <dl>
  591. <dt><span class="paramLabel">Parameters:</span></dt>
  592. <dd><code>value</code> - The value to append.</dd>
  593. <dt><span class="returnLabel">Returns:</span></dt>
  594. <dd>this array.</dd>
  595. </dl>
  596. </li>
  597. </ul>
  598. <a name="put-double-">
  599. <!-- -->
  600. </a>
  601. <ul class="blockList">
  602. <li class="blockList">
  603. <h4>put</h4>
  604. <pre>public&nbsp;<a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a>&nbsp;put(double&nbsp;value)
  605. throws <a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></pre>
  606. <div class="block">Appends <code>value</code> to the end of this array.</div>
  607. <dl>
  608. <dt><span class="paramLabel">Parameters:</span></dt>
  609. <dd><code>value</code> - a finite value. May not be <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#isNaN--" title="class or interface in java.lang"><code>NaNs</code></a> or
  610. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#isInfinite--" title="class or interface in java.lang"><code>infinities</code></a>.</dd>
  611. <dt><span class="returnLabel">Returns:</span></dt>
  612. <dd>this array.</dd>
  613. <dt><span class="throwsLabel">Throws:</span></dt>
  614. <dd><code><a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></code> - If the value is unacceptable.</dd>
  615. </dl>
  616. </li>
  617. </ul>
  618. <a name="put-int-">
  619. <!-- -->
  620. </a>
  621. <ul class="blockList">
  622. <li class="blockList">
  623. <h4>put</h4>
  624. <pre>public&nbsp;<a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a>&nbsp;put(int&nbsp;value)</pre>
  625. <div class="block">Appends <code>value</code> to the end of this array.</div>
  626. <dl>
  627. <dt><span class="paramLabel">Parameters:</span></dt>
  628. <dd><code>value</code> - The value to append.</dd>
  629. <dt><span class="returnLabel">Returns:</span></dt>
  630. <dd>this array.</dd>
  631. </dl>
  632. </li>
  633. </ul>
  634. <a name="put-long-">
  635. <!-- -->
  636. </a>
  637. <ul class="blockList">
  638. <li class="blockList">
  639. <h4>put</h4>
  640. <pre>public&nbsp;<a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a>&nbsp;put(long&nbsp;value)</pre>
  641. <div class="block">Appends <code>value</code> to the end of this array.</div>
  642. <dl>
  643. <dt><span class="paramLabel">Parameters:</span></dt>
  644. <dd><code>value</code> - The value to append.</dd>
  645. <dt><span class="returnLabel">Returns:</span></dt>
  646. <dd>this array.</dd>
  647. </dl>
  648. </li>
  649. </ul>
  650. <a name="put-java.lang.Object-">
  651. <!-- -->
  652. </a>
  653. <ul class="blockList">
  654. <li class="blockList">
  655. <h4>put</h4>
  656. <pre>public&nbsp;<a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a>&nbsp;put(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;value)</pre>
  657. <div class="block">Appends <code>value</code> to the end of this array.</div>
  658. <dl>
  659. <dt><span class="paramLabel">Parameters:</span></dt>
  660. <dd><code>value</code> - a <a href="../twitter4j/JSONObject.html" title="class in twitter4j"><code>JSONObject</code></a>, <a href="../twitter4j/JSONArray.html" title="class in twitter4j"><code>JSONArray</code></a>, String, Boolean,
  661. Integer, Long, Double, <a href="../twitter4j/JSONObject.html#NULL"><code>JSONObject.NULL</code></a>, or <code>null</code>. May
  662. not be <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#isNaN--" title="class or interface in java.lang"><code>NaNs</code></a> or <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#isInfinite--" title="class or interface in java.lang"><code>infinities</code></a>. Unsupported values are not permitted and will cause the
  663. array to be in an inconsistent state.</dd>
  664. <dt><span class="returnLabel">Returns:</span></dt>
  665. <dd>this array.</dd>
  666. </dl>
  667. </li>
  668. </ul>
  669. <a name="put-int-boolean-">
  670. <!-- -->
  671. </a>
  672. <ul class="blockList">
  673. <li class="blockList">
  674. <h4>put</h4>
  675. <pre>public&nbsp;<a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a>&nbsp;put(int&nbsp;index,
  676. boolean&nbsp;value)
  677. throws <a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></pre>
  678. <div class="block">Sets the value at <code>index</code> to <code>value</code>, null padding this array
  679. to the required length if necessary. If a value already exists at <code>index</code>, it will be replaced.</div>
  680. <dl>
  681. <dt><span class="paramLabel">Parameters:</span></dt>
  682. <dd><code>index</code> - Where to put the value.</dd>
  683. <dd><code>value</code> - The value to set.</dd>
  684. <dt><span class="returnLabel">Returns:</span></dt>
  685. <dd>this array.</dd>
  686. <dt><span class="throwsLabel">Throws:</span></dt>
  687. <dd><code><a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></code> - This should never happen.</dd>
  688. </dl>
  689. </li>
  690. </ul>
  691. <a name="put-int-double-">
  692. <!-- -->
  693. </a>
  694. <ul class="blockList">
  695. <li class="blockList">
  696. <h4>put</h4>
  697. <pre>public&nbsp;<a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a>&nbsp;put(int&nbsp;index,
  698. double&nbsp;value)
  699. throws <a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></pre>
  700. <div class="block">Sets the value at <code>index</code> to <code>value</code>, null padding this array
  701. to the required length if necessary. If a value already exists at <code>index</code>, it will be replaced.</div>
  702. <dl>
  703. <dt><span class="paramLabel">Parameters:</span></dt>
  704. <dd><code>index</code> - Where to put the value.</dd>
  705. <dd><code>value</code> - a finite value. May not be <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#isNaN--" title="class or interface in java.lang"><code>NaNs</code></a> or
  706. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#isInfinite--" title="class or interface in java.lang"><code>infinities</code></a>.</dd>
  707. <dt><span class="returnLabel">Returns:</span></dt>
  708. <dd>this array.</dd>
  709. <dt><span class="throwsLabel">Throws:</span></dt>
  710. <dd><code><a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></code> - If the value is not a finite value.</dd>
  711. </dl>
  712. </li>
  713. </ul>
  714. <a name="put-int-int-">
  715. <!-- -->
  716. </a>
  717. <ul class="blockList">
  718. <li class="blockList">
  719. <h4>put</h4>
  720. <pre>public&nbsp;<a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a>&nbsp;put(int&nbsp;index,
  721. int&nbsp;value)
  722. throws <a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></pre>
  723. <div class="block">Sets the value at <code>index</code> to <code>value</code>, null padding this array
  724. to the required length if necessary. If a value already exists at <code>index</code>, it will be replaced.</div>
  725. <dl>
  726. <dt><span class="paramLabel">Parameters:</span></dt>
  727. <dd><code>index</code> - Where to put the value.</dd>
  728. <dd><code>value</code> - The value to set.</dd>
  729. <dt><span class="returnLabel">Returns:</span></dt>
  730. <dd>this array.</dd>
  731. <dt><span class="throwsLabel">Throws:</span></dt>
  732. <dd><code><a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></code> - Should never actually happen.</dd>
  733. </dl>
  734. </li>
  735. </ul>
  736. <a name="put-int-long-">
  737. <!-- -->
  738. </a>
  739. <ul class="blockList">
  740. <li class="blockList">
  741. <h4>put</h4>
  742. <pre>public&nbsp;<a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a>&nbsp;put(int&nbsp;index,
  743. long&nbsp;value)
  744. throws <a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></pre>
  745. <div class="block">Sets the value at <code>index</code> to <code>value</code>, null padding this array
  746. to the required length if necessary. If a value already exists at <code>index</code>, it will be replaced.</div>
  747. <dl>
  748. <dt><span class="paramLabel">Parameters:</span></dt>
  749. <dd><code>index</code> - Where to put the value.</dd>
  750. <dd><code>value</code> - The value to set.</dd>
  751. <dt><span class="returnLabel">Returns:</span></dt>
  752. <dd>this array.</dd>
  753. <dt><span class="throwsLabel">Throws:</span></dt>
  754. <dd><code><a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></code> - Should never actually happen.</dd>
  755. </dl>
  756. </li>
  757. </ul>
  758. <a name="put-int-java.lang.Object-">
  759. <!-- -->
  760. </a>
  761. <ul class="blockList">
  762. <li class="blockList">
  763. <h4>put</h4>
  764. <pre>public&nbsp;<a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a>&nbsp;put(int&nbsp;index,
  765. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;value)
  766. throws <a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></pre>
  767. <div class="block">Sets the value at <code>index</code> to <code>value</code>, null padding this array
  768. to the required length if necessary. If a value already exists at <code>index</code>, it will be replaced.</div>
  769. <dl>
  770. <dt><span class="paramLabel">Parameters:</span></dt>
  771. <dd><code>index</code> - Where to put the value.</dd>
  772. <dd><code>value</code> - a <a href="../twitter4j/JSONObject.html" title="class in twitter4j"><code>JSONObject</code></a>, <a href="../twitter4j/JSONArray.html" title="class in twitter4j"><code>JSONArray</code></a>, String, Boolean,
  773. Integer, Long, Double, <a href="../twitter4j/JSONObject.html#NULL"><code>JSONObject.NULL</code></a>, or <code>null</code>. May
  774. not be <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#isNaN--" title="class or interface in java.lang"><code>NaNs</code></a> or <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#isInfinite--" title="class or interface in java.lang"><code>infinities</code></a>.</dd>
  775. <dt><span class="returnLabel">Returns:</span></dt>
  776. <dd>this array.</dd>
  777. <dt><span class="throwsLabel">Throws:</span></dt>
  778. <dd><code><a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></code> - If the value cannot be represented as a finite double value.</dd>
  779. </dl>
  780. </li>
  781. </ul>
  782. <a name="isNull-int-">
  783. <!-- -->
  784. </a>
  785. <ul class="blockList">
  786. <li class="blockList">
  787. <h4>isNull</h4>
  788. <pre>public&nbsp;boolean&nbsp;isNull(int&nbsp;index)</pre>
  789. <div class="block">Returns true if this array has no value at <code>index</code>, or if its value
  790. is the <code>null</code> reference or <a href="../twitter4j/JSONObject.html#NULL"><code>JSONObject.NULL</code></a>.</div>
  791. <dl>
  792. <dt><span class="paramLabel">Parameters:</span></dt>
  793. <dd><code>index</code> - Which value to check.</dd>
  794. <dt><span class="returnLabel">Returns:</span></dt>
  795. <dd>true if the value is null.</dd>
  796. </dl>
  797. </li>
  798. </ul>
  799. <a name="get-int-">
  800. <!-- -->
  801. </a>
  802. <ul class="blockList">
  803. <li class="blockList">
  804. <h4>get</h4>
  805. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;get(int&nbsp;index)
  806. throws <a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></pre>
  807. <div class="block">Returns the value at <code>index</code>.</div>
  808. <dl>
  809. <dt><span class="paramLabel">Parameters:</span></dt>
  810. <dd><code>index</code> - Which value to get.</dd>
  811. <dt><span class="returnLabel">Returns:</span></dt>
  812. <dd>the value at the specified location.</dd>
  813. <dt><span class="throwsLabel">Throws:</span></dt>
  814. <dd><code><a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></code> - if this array has no value at <code>index</code>, or if
  815. that value is the <code>null</code> reference. This method returns
  816. normally if the value is <code>JSONObject#NULL</code>.</dd>
  817. </dl>
  818. </li>
  819. </ul>
  820. <a name="opt-int-">
  821. <!-- -->
  822. </a>
  823. <ul class="blockList">
  824. <li class="blockList">
  825. <h4>opt</h4>
  826. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;opt(int&nbsp;index)</pre>
  827. <div class="block">Returns the value at <code>index</code>, or null if the array has no value
  828. at <code>index</code>.</div>
  829. <dl>
  830. <dt><span class="paramLabel">Parameters:</span></dt>
  831. <dd><code>index</code> - Which value to get.</dd>
  832. <dt><span class="returnLabel">Returns:</span></dt>
  833. <dd>the value at the specified location.</dd>
  834. </dl>
  835. </li>
  836. </ul>
  837. <a name="remove-int-">
  838. <!-- -->
  839. </a>
  840. <ul class="blockList">
  841. <li class="blockList">
  842. <h4>remove</h4>
  843. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;remove(int&nbsp;index)</pre>
  844. <div class="block">Removes and returns the value at <code>index</code>, or null if the array has no value
  845. at <code>index</code>.</div>
  846. <dl>
  847. <dt><span class="paramLabel">Parameters:</span></dt>
  848. <dd><code>index</code> - Which value to remove.</dd>
  849. <dt><span class="returnLabel">Returns:</span></dt>
  850. <dd>The value previously at the specified location.</dd>
  851. </dl>
  852. </li>
  853. </ul>
  854. <a name="getBoolean-int-">
  855. <!-- -->
  856. </a>
  857. <ul class="blockList">
  858. <li class="blockList">
  859. <h4>getBoolean</h4>
  860. <pre>public&nbsp;boolean&nbsp;getBoolean(int&nbsp;index)
  861. throws <a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></pre>
  862. <div class="block">Returns the value at <code>index</code> if it exists and is a boolean or can
  863. be coerced to a boolean.</div>
  864. <dl>
  865. <dt><span class="paramLabel">Parameters:</span></dt>
  866. <dd><code>index</code> - Which value to get.</dd>
  867. <dt><span class="returnLabel">Returns:</span></dt>
  868. <dd>the value at the specified location.</dd>
  869. <dt><span class="throwsLabel">Throws:</span></dt>
  870. <dd><code><a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></code> - if the value at <code>index</code> doesn't exist or
  871. cannot be coerced to a boolean.</dd>
  872. </dl>
  873. </li>
  874. </ul>
  875. <a name="optBoolean-int-">
  876. <!-- -->
  877. </a>
  878. <ul class="blockList">
  879. <li class="blockList">
  880. <h4>optBoolean</h4>
  881. <pre>public&nbsp;boolean&nbsp;optBoolean(int&nbsp;index)</pre>
  882. <div class="block">Returns the value at <code>index</code> if it exists and is a boolean or can
  883. be coerced to a boolean. Returns false otherwise.</div>
  884. <dl>
  885. <dt><span class="paramLabel">Parameters:</span></dt>
  886. <dd><code>index</code> - Which value to get.</dd>
  887. <dt><span class="returnLabel">Returns:</span></dt>
  888. <dd>the value at the specified location.</dd>
  889. </dl>
  890. </li>
  891. </ul>
  892. <a name="optBoolean-int-boolean-">
  893. <!-- -->
  894. </a>
  895. <ul class="blockList">
  896. <li class="blockList">
  897. <h4>optBoolean</h4>
  898. <pre>public&nbsp;boolean&nbsp;optBoolean(int&nbsp;index,
  899. boolean&nbsp;fallback)</pre>
  900. <div class="block">Returns the value at <code>index</code> if it exists and is a boolean or can
  901. be coerced to a boolean. Returns <code>fallback</code> otherwise.</div>
  902. <dl>
  903. <dt><span class="paramLabel">Parameters:</span></dt>
  904. <dd><code>index</code> - Which value to get.</dd>
  905. <dd><code>fallback</code> - the fallback value to return if no value exists.</dd>
  906. <dt><span class="returnLabel">Returns:</span></dt>
  907. <dd>the value at the specified location or the fallback value.</dd>
  908. </dl>
  909. </li>
  910. </ul>
  911. <a name="getDouble-int-">
  912. <!-- -->
  913. </a>
  914. <ul class="blockList">
  915. <li class="blockList">
  916. <h4>getDouble</h4>
  917. <pre>public&nbsp;double&nbsp;getDouble(int&nbsp;index)
  918. throws <a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></pre>
  919. <div class="block">Returns the value at <code>index</code> if it exists and is a double or can
  920. be coerced to a double.</div>
  921. <dl>
  922. <dt><span class="paramLabel">Parameters:</span></dt>
  923. <dd><code>index</code> - Which value to get.</dd>
  924. <dt><span class="returnLabel">Returns:</span></dt>
  925. <dd>the value at the specified location.</dd>
  926. <dt><span class="throwsLabel">Throws:</span></dt>
  927. <dd><code><a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></code> - if the value at <code>index</code> doesn't exist or
  928. cannot be coerced to a double.</dd>
  929. </dl>
  930. </li>
  931. </ul>
  932. <a name="optDouble-int-">
  933. <!-- -->
  934. </a>
  935. <ul class="blockList">
  936. <li class="blockList">
  937. <h4>optDouble</h4>
  938. <pre>public&nbsp;double&nbsp;optDouble(int&nbsp;index)</pre>
  939. <div class="block">Returns the value at <code>index</code> if it exists and is a double or can
  940. be coerced to a double. Returns <code>NaN</code> otherwise.</div>
  941. <dl>
  942. <dt><span class="paramLabel">Parameters:</span></dt>
  943. <dd><code>index</code> - Which value to get.</dd>
  944. <dt><span class="returnLabel">Returns:</span></dt>
  945. <dd>the value at the specified location.</dd>
  946. </dl>
  947. </li>
  948. </ul>
  949. <a name="optDouble-int-double-">
  950. <!-- -->
  951. </a>
  952. <ul class="blockList">
  953. <li class="blockList">
  954. <h4>optDouble</h4>
  955. <pre>public&nbsp;double&nbsp;optDouble(int&nbsp;index,
  956. double&nbsp;fallback)</pre>
  957. <div class="block">Returns the value at <code>index</code> if it exists and is a double or can
  958. be coerced to a double. Returns <code>fallback</code> otherwise.</div>
  959. <dl>
  960. <dt><span class="paramLabel">Parameters:</span></dt>
  961. <dd><code>index</code> - Which value to get.</dd>
  962. <dd><code>fallback</code> - The fallback value to use if no value is at the specified location.</dd>
  963. <dt><span class="returnLabel">Returns:</span></dt>
  964. <dd>the value at the specified location or the fallback value.</dd>
  965. </dl>
  966. </li>
  967. </ul>
  968. <a name="getInt-int-">
  969. <!-- -->
  970. </a>
  971. <ul class="blockList">
  972. <li class="blockList">
  973. <h4>getInt</h4>
  974. <pre>public&nbsp;int&nbsp;getInt(int&nbsp;index)
  975. throws <a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></pre>
  976. <div class="block">Returns the value at <code>index</code> if it exists and is an int or
  977. can be coerced to an int.</div>
  978. <dl>
  979. <dt><span class="paramLabel">Parameters:</span></dt>
  980. <dd><code>index</code> - Which value to get.</dd>
  981. <dt><span class="returnLabel">Returns:</span></dt>
  982. <dd>the value at the specified location.</dd>
  983. <dt><span class="throwsLabel">Throws:</span></dt>
  984. <dd><code><a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></code> - if the value at <code>index</code> doesn't exist or
  985. cannot be coerced to a int.</dd>
  986. </dl>
  987. </li>
  988. </ul>
  989. <a name="optInt-int-">
  990. <!-- -->
  991. </a>
  992. <ul class="blockList">
  993. <li class="blockList">
  994. <h4>optInt</h4>
  995. <pre>public&nbsp;int&nbsp;optInt(int&nbsp;index)</pre>
  996. <div class="block">Returns the value at <code>index</code> if it exists and is an int or
  997. can be coerced to an int. Returns 0 otherwise.</div>
  998. <dl>
  999. <dt><span class="paramLabel">Parameters:</span></dt>
  1000. <dd><code>index</code> - Which value to get.</dd>
  1001. <dt><span class="returnLabel">Returns:</span></dt>
  1002. <dd>the value at the specified location.</dd>
  1003. </dl>
  1004. </li>
  1005. </ul>
  1006. <a name="optInt-int-int-">
  1007. <!-- -->
  1008. </a>
  1009. <ul class="blockList">
  1010. <li class="blockList">
  1011. <h4>optInt</h4>
  1012. <pre>public&nbsp;int&nbsp;optInt(int&nbsp;index,
  1013. int&nbsp;fallback)</pre>
  1014. <div class="block">Returns the value at <code>index</code> if it exists and is an int or
  1015. can be coerced to an int. Returns <code>fallback</code> otherwise.</div>
  1016. <dl>
  1017. <dt><span class="paramLabel">Parameters:</span></dt>
  1018. <dd><code>index</code> - Which value to get.</dd>
  1019. <dd><code>fallback</code> - The fallback value to use if no value is at the specified location.</dd>
  1020. <dt><span class="returnLabel">Returns:</span></dt>
  1021. <dd>the value at the specified location or the fallback value.</dd>
  1022. </dl>
  1023. </li>
  1024. </ul>
  1025. <a name="getLong-int-">
  1026. <!-- -->
  1027. </a>
  1028. <ul class="blockList">
  1029. <li class="blockList">
  1030. <h4>getLong</h4>
  1031. <pre>public&nbsp;long&nbsp;getLong(int&nbsp;index)
  1032. throws <a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></pre>
  1033. <div class="block">Returns the value at <code>index</code> if it exists and is a long or
  1034. can be coerced to a long.</div>
  1035. <dl>
  1036. <dt><span class="paramLabel">Parameters:</span></dt>
  1037. <dd><code>index</code> - Which value to get.</dd>
  1038. <dt><span class="returnLabel">Returns:</span></dt>
  1039. <dd>the value at the specified location.</dd>
  1040. <dt><span class="throwsLabel">Throws:</span></dt>
  1041. <dd><code><a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></code> - if the value at <code>index</code> doesn't exist or
  1042. cannot be coerced to a long.</dd>
  1043. </dl>
  1044. </li>
  1045. </ul>
  1046. <a name="optLong-int-">
  1047. <!-- -->
  1048. </a>
  1049. <ul class="blockList">
  1050. <li class="blockList">
  1051. <h4>optLong</h4>
  1052. <pre>public&nbsp;long&nbsp;optLong(int&nbsp;index)</pre>
  1053. <div class="block">Returns the value at <code>index</code> if it exists and is a long or
  1054. can be coerced to a long. Returns 0 otherwise.</div>
  1055. <dl>
  1056. <dt><span class="paramLabel">Parameters:</span></dt>
  1057. <dd><code>index</code> - Which value to get.</dd>
  1058. <dt><span class="returnLabel">Returns:</span></dt>
  1059. <dd>the value at the specified location.</dd>
  1060. </dl>
  1061. </li>
  1062. </ul>
  1063. <a name="optLong-int-long-">
  1064. <!-- -->
  1065. </a>
  1066. <ul class="blockList">
  1067. <li class="blockList">
  1068. <h4>optLong</h4>
  1069. <pre>public&nbsp;long&nbsp;optLong(int&nbsp;index,
  1070. long&nbsp;fallback)</pre>
  1071. <div class="block">Returns the value at <code>index</code> if it exists and is a long or
  1072. can be coerced to a long. Returns <code>fallback</code> otherwise.</div>
  1073. <dl>
  1074. <dt><span class="paramLabel">Parameters:</span></dt>
  1075. <dd><code>index</code> - Which value to get.</dd>
  1076. <dd><code>fallback</code> - The fallback value to use if no value is at the specified location.</dd>
  1077. <dt><span class="returnLabel">Returns:</span></dt>
  1078. <dd>the value at the specified location or the fallback value.</dd>
  1079. </dl>
  1080. </li>
  1081. </ul>
  1082. <a name="getString-int-">
  1083. <!-- -->
  1084. </a>
  1085. <ul class="blockList">
  1086. <li class="blockList">
  1087. <h4>getString</h4>
  1088. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getString(int&nbsp;index)
  1089. throws <a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></pre>
  1090. <div class="block">Returns the value at <code>index</code> if it exists, coercing it if
  1091. necessary.</div>
  1092. <dl>
  1093. <dt><span class="paramLabel">Parameters:</span></dt>
  1094. <dd><code>index</code> - Which value to get.</dd>
  1095. <dt><span class="returnLabel">Returns:</span></dt>
  1096. <dd>the value at the specified location.</dd>
  1097. <dt><span class="throwsLabel">Throws:</span></dt>
  1098. <dd><code><a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></code> - if no such value exists.</dd>
  1099. </dl>
  1100. </li>
  1101. </ul>
  1102. <a name="optString-int-">
  1103. <!-- -->
  1104. </a>
  1105. <ul class="blockList">
  1106. <li class="blockList">
  1107. <h4>optString</h4>
  1108. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;optString(int&nbsp;index)</pre>
  1109. <div class="block">Returns the value at <code>index</code> if it exists, coercing it if
  1110. necessary. Returns the empty string if no such value exists.</div>
  1111. <dl>
  1112. <dt><span class="paramLabel">Parameters:</span></dt>
  1113. <dd><code>index</code> - Which value to get.</dd>
  1114. <dt><span class="returnLabel">Returns:</span></dt>
  1115. <dd>the value at the specified location.</dd>
  1116. </dl>
  1117. </li>
  1118. </ul>
  1119. <a name="optString-int-java.lang.String-">
  1120. <!-- -->
  1121. </a>
  1122. <ul class="blockList">
  1123. <li class="blockList">
  1124. <h4>optString</h4>
  1125. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;optString(int&nbsp;index,
  1126. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;fallback)</pre>
  1127. <div class="block">Returns the value at <code>index</code> if it exists, coercing it if
  1128. necessary. Returns <code>fallback</code> if no such value exists.</div>
  1129. <dl>
  1130. <dt><span class="paramLabel">Parameters:</span></dt>
  1131. <dd><code>index</code> - Which value to get.</dd>
  1132. <dd><code>fallback</code> - The fallback value to use if no value is at the specified location.</dd>
  1133. <dt><span class="returnLabel">Returns:</span></dt>
  1134. <dd>the value at the specified location or the fallback value.</dd>
  1135. </dl>
  1136. </li>
  1137. </ul>
  1138. <a name="getJSONArray-int-">
  1139. <!-- -->
  1140. </a>
  1141. <ul class="blockList">
  1142. <li class="blockList">
  1143. <h4>getJSONArray</h4>
  1144. <pre>public&nbsp;<a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a>&nbsp;getJSONArray(int&nbsp;index)
  1145. throws <a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></pre>
  1146. <div class="block">Returns the value at <code>index</code> if it exists and is a <code>JSONArray</code>.</div>
  1147. <dl>
  1148. <dt><span class="paramLabel">Parameters:</span></dt>
  1149. <dd><code>index</code> - Which value to get.</dd>
  1150. <dt><span class="returnLabel">Returns:</span></dt>
  1151. <dd>the value at the specified location.</dd>
  1152. <dt><span class="throwsLabel">Throws:</span></dt>
  1153. <dd><code><a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></code> - if the value doesn't exist or is not a <code>JSONArray</code>.</dd>
  1154. </dl>
  1155. </li>
  1156. </ul>
  1157. <a name="optJSONArray-int-">
  1158. <!-- -->
  1159. </a>
  1160. <ul class="blockList">
  1161. <li class="blockList">
  1162. <h4>optJSONArray</h4>
  1163. <pre>public&nbsp;<a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a>&nbsp;optJSONArray(int&nbsp;index)</pre>
  1164. <div class="block">Returns the value at <code>index</code> if it exists and is a <code>JSONArray</code>. Returns null otherwise.</div>
  1165. <dl>
  1166. <dt><span class="paramLabel">Parameters:</span></dt>
  1167. <dd><code>index</code> - Which value to get.</dd>
  1168. <dt><span class="returnLabel">Returns:</span></dt>
  1169. <dd>the value at the specified location.</dd>
  1170. </dl>
  1171. </li>
  1172. </ul>
  1173. <a name="getJSONObject-int-">
  1174. <!-- -->
  1175. </a>
  1176. <ul class="blockList">
  1177. <li class="blockList">
  1178. <h4>getJSONObject</h4>
  1179. <pre>public&nbsp;<a href="../twitter4j/JSONObject.html" title="class in twitter4j">JSONObject</a>&nbsp;getJSONObject(int&nbsp;index)
  1180. throws <a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></pre>
  1181. <div class="block">Returns the value at <code>index</code> if it exists and is a <code>JSONObject</code>.</div>
  1182. <dl>
  1183. <dt><span class="paramLabel">Parameters:</span></dt>
  1184. <dd><code>index</code> - Which value to get.</dd>
  1185. <dt><span class="returnLabel">Returns:</span></dt>
  1186. <dd>the value at the specified location.</dd>
  1187. <dt><span class="throwsLabel">Throws:</span></dt>
  1188. <dd><code><a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></code> - if the value doesn't exist or is not a <code>JSONObject</code>.</dd>
  1189. </dl>
  1190. </li>
  1191. </ul>
  1192. <a name="optJSONObject-int-">
  1193. <!-- -->
  1194. </a>
  1195. <ul class="blockList">
  1196. <li class="blockList">
  1197. <h4>optJSONObject</h4>
  1198. <pre>public&nbsp;<a href="../twitter4j/JSONObject.html" title="class in twitter4j">JSONObject</a>&nbsp;optJSONObject(int&nbsp;index)</pre>
  1199. <div class="block">Returns the value at <code>index</code> if it exists and is a <code>JSONObject</code>. Returns null otherwise.</div>
  1200. <dl>
  1201. <dt><span class="paramLabel">Parameters:</span></dt>
  1202. <dd><code>index</code> - Which value to get.</dd>
  1203. <dt><span class="returnLabel">Returns:</span></dt>
  1204. <dd>the value at the specified location.</dd>
  1205. </dl>
  1206. </li>
  1207. </ul>
  1208. <a name="toJSONObject-twitter4j.JSONArray-">
  1209. <!-- -->
  1210. </a>
  1211. <ul class="blockList">
  1212. <li class="blockList">
  1213. <h4>toJSONObject</h4>
  1214. <pre>public&nbsp;<a href="../twitter4j/JSONObject.html" title="class in twitter4j">JSONObject</a>&nbsp;toJSONObject(<a href="../twitter4j/JSONArray.html" title="class in twitter4j">JSONArray</a>&nbsp;names)
  1215. throws <a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></pre>
  1216. <div class="block">Returns a new object whose values are the values in this array, and whose
  1217. names are the values in <code>names</code>. Names and values are paired up by
  1218. index from 0 through to the shorter array's length. Names that are not
  1219. strings will be coerced to strings. This method returns null if either
  1220. array is empty.</div>
  1221. <dl>
  1222. <dt><span class="paramLabel">Parameters:</span></dt>
  1223. <dd><code>names</code> - The names to apply to the returned values.</dd>
  1224. <dt><span class="returnLabel">Returns:</span></dt>
  1225. <dd>the newly constructed object.</dd>
  1226. <dt><span class="throwsLabel">Throws:</span></dt>
  1227. <dd><code><a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></code> - Should not be possible.</dd>
  1228. </dl>
  1229. </li>
  1230. </ul>
  1231. <a name="join-java.lang.String-">
  1232. <!-- -->
  1233. </a>
  1234. <ul class="blockList">
  1235. <li class="blockList">
  1236. <h4>join</h4>
  1237. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;join(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;separator)
  1238. throws <a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></pre>
  1239. <div class="block">Returns a new string by alternating this array's values with <code>separator</code>. This array's string values are quoted and have their special
  1240. characters escaped. For example, the array containing the strings '12"
  1241. pizza', 'taco' and 'soda' joined on '+' returns this:
  1242. <pre>"12\" pizza"+"taco"+"soda"</pre></div>
  1243. <dl>
  1244. <dt><span class="paramLabel">Parameters:</span></dt>
  1245. <dd><code>separator</code> - The string used to separate the returned values.</dd>
  1246. <dt><span class="returnLabel">Returns:</span></dt>
  1247. <dd>the conjoined values.</dd>
  1248. <dt><span class="throwsLabel">Throws:</span></dt>
  1249. <dd><code><a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></code> - Only if there is a coding error.</dd>
  1250. </dl>
  1251. </li>
  1252. </ul>
  1253. <a name="toString--">
  1254. <!-- -->
  1255. </a>
  1256. <ul class="blockList">
  1257. <li class="blockList">
  1258. <h4>toString</h4>
  1259. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString()</pre>
  1260. <div class="block">Encodes this array as a compact JSON string, such as:
  1261. <pre>[94043,90210]</pre></div>
  1262. <dl>
  1263. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  1264. <dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code>&nbsp;in class&nbsp;<code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
  1265. <dt><span class="returnLabel">Returns:</span></dt>
  1266. <dd>The string form of this array.</dd>
  1267. </dl>
  1268. </li>
  1269. </ul>
  1270. <a name="toString-int-">
  1271. <!-- -->
  1272. </a>
  1273. <ul class="blockList">
  1274. <li class="blockList">
  1275. <h4>toString</h4>
  1276. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(int&nbsp;indentSpaces)
  1277. throws <a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></pre>
  1278. <div class="block">Encodes this array as a human readable JSON string for debugging, such
  1279. as:
  1280. <pre>
  1281. [
  1282. 94043,
  1283. 90210
  1284. ]</pre></div>
  1285. <dl>
  1286. <dt><span class="paramLabel">Parameters:</span></dt>
  1287. <dd><code>indentSpaces</code> - the number of spaces to indent for each level of
  1288. nesting.</dd>
  1289. <dt><span class="returnLabel">Returns:</span></dt>
  1290. <dd>The string form of this array.</dd>
  1291. <dt><span class="throwsLabel">Throws:</span></dt>
  1292. <dd><code><a href="../twitter4j/JSONException.html" title="class in twitter4j">JSONException</a></code> - Only if there is a coding error.</dd>
  1293. </dl>
  1294. </li>
  1295. </ul>
  1296. <a name="equals-java.lang.Object-">
  1297. <!-- -->
  1298. </a>
  1299. <ul class="blockList">
  1300. <li class="blockList">
  1301. <h4>equals</h4>
  1302. <pre>public&nbsp;boolean&nbsp;equals(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;o)</pre>
  1303. <dl>
  1304. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  1305. <dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a></code>&nbsp;in class&nbsp;<code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
  1306. </dl>
  1307. </li>
  1308. </ul>
  1309. <a name="hashCode--">
  1310. <!-- -->
  1311. </a>
  1312. <ul class="blockListLast">
  1313. <li class="blockList">
  1314. <h4>hashCode</h4>
  1315. <pre>public&nbsp;int&nbsp;hashCode()</pre>
  1316. <dl>
  1317. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  1318. <dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a></code>&nbsp;in class&nbsp;<code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
  1319. </dl>
  1320. </li>
  1321. </ul>
  1322. </li>
  1323. </ul>
  1324. </li>
  1325. </ul>
  1326. </div>
  1327. </div>
  1328. <!-- ========= END OF CLASS DATA ========= -->
  1329. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  1330. <div class="bottomNav"><a name="navbar.bottom">
  1331. <!-- -->
  1332. </a>
  1333. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  1334. <a name="navbar.bottom.firstrow">
  1335. <!-- -->
  1336. </a>
  1337. <ul class="navList" title="Navigation">
  1338. <li><a href="../overview-summary.html">Overview</a></li>
  1339. <li><a href="package-summary.html">Package</a></li>
  1340. <li class="navBarCell1Rev">Class</li>
  1341. <li><a href="class-use/JSONArray.html">Use</a></li>
  1342. <li><a href="package-tree.html">Tree</a></li>
  1343. <li><a href="../deprecated-list.html">Deprecated</a></li>
  1344. <li><a href="../index-all.html">Index</a></li>
  1345. <li><a href="../help-doc.html">Help</a></li>
  1346. </ul>
  1347. </div>
  1348. <div class="subNav">
  1349. <ul class="navList">
  1350. <li><a href="../twitter4j/IDs.html" title="interface in twitter4j"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  1351. <li><a href="../twitter4j/JSONException.html" title="class in twitter4j"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  1352. </ul>
  1353. <ul class="navList">
  1354. <li><a href="../index.html?twitter4j/JSONArray.html" target="_top">Frames</a></li>
  1355. <li><a href="JSONArray.html" target="_top">No&nbsp;Frames</a></li>
  1356. </ul>
  1357. <ul class="navList" id="allclasses_navbar_bottom">
  1358. <li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li>
  1359. </ul>
  1360. <div>
  1361. <script type="text/javascript"><!--
  1362. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  1363. if(window==top) {
  1364. allClassesLink.style.display = "block";
  1365. }
  1366. else {
  1367. allClassesLink.style.display = "none";
  1368. }
  1369. //-->
  1370. </script>
  1371. </div>
  1372. <div>
  1373. <ul class="subNavList">
  1374. <li>Summary:&nbsp;</li>
  1375. <li>Nested&nbsp;|&nbsp;</li>
  1376. <li>Field&nbsp;|&nbsp;</li>
  1377. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  1378. <li><a href="#method.summary">Method</a></li>
  1379. </ul>
  1380. <ul class="subNavList">
  1381. <li>Detail:&nbsp;</li>
  1382. <li>Field&nbsp;|&nbsp;</li>
  1383. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  1384. <li><a href="#method.detail">Method</a></li>
  1385. </ul>
  1386. </div>
  1387. <a name="skip.navbar.bottom">
  1388. <!-- -->
  1389. </a></div>
  1390. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  1391. <p class="legalCopy"><small>Copyright &#169; 2018. All rights reserved.</small></p>
  1392. </body>
  1393. </html>