LinkedTreeMap.smali 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192
  1. .class public final Lcom/google/gson/internal/LinkedTreeMap;
  2. .super Ljava/util/AbstractMap;
  3. .source ""
  4. # interfaces
  5. .implements Ljava/io/Serializable;
  6. # annotations
  7. .annotation system Ldalvik/annotation/MemberClasses;
  8. value = {
  9. Lcom/google/gson/internal/LinkedTreeMap$KeySet;,
  10. Lcom/google/gson/internal/LinkedTreeMap$EntrySet;,
  11. Lcom/google/gson/internal/LinkedTreeMap$LinkedTreeMapIterator;,
  12. Lcom/google/gson/internal/LinkedTreeMap$Node;
  13. }
  14. .end annotation
  15. .annotation system Ldalvik/annotation/Signature;
  16. value = {
  17. "<K:",
  18. "Ljava/lang/Object;",
  19. "V:",
  20. "Ljava/lang/Object;",
  21. ">",
  22. "Ljava/util/AbstractMap<",
  23. "TK;TV;>;",
  24. "Ljava/io/Serializable;"
  25. }
  26. .end annotation
  27. # static fields
  28. .field static final synthetic $assertionsDisabled:Z
  29. .field private static final NATURAL_ORDER:Ljava/util/Comparator;
  30. .annotation system Ldalvik/annotation/Signature;
  31. value = {
  32. "Ljava/util/Comparator<",
  33. "Ljava/lang/Comparable;",
  34. ">;"
  35. }
  36. .end annotation
  37. .end field
  38. # instance fields
  39. .field comparator:Ljava/util/Comparator;
  40. .annotation system Ldalvik/annotation/Signature;
  41. value = {
  42. "Ljava/util/Comparator<",
  43. "-TK;>;"
  44. }
  45. .end annotation
  46. .end field
  47. .field private entrySet:Lcom/google/gson/internal/LinkedTreeMap$EntrySet;
  48. .annotation system Ldalvik/annotation/Signature;
  49. value = {
  50. "Lcom/google/gson/internal/LinkedTreeMap<",
  51. "TK;TV;>.EntrySet;"
  52. }
  53. .end annotation
  54. .end field
  55. .field final header:Lcom/google/gson/internal/LinkedTreeMap$Node;
  56. .annotation system Ldalvik/annotation/Signature;
  57. value = {
  58. "Lcom/google/gson/internal/LinkedTreeMap$Node<",
  59. "TK;TV;>;"
  60. }
  61. .end annotation
  62. .end field
  63. .field private keySet:Lcom/google/gson/internal/LinkedTreeMap$KeySet;
  64. .annotation system Ldalvik/annotation/Signature;
  65. value = {
  66. "Lcom/google/gson/internal/LinkedTreeMap<",
  67. "TK;TV;>.KeySet;"
  68. }
  69. .end annotation
  70. .end field
  71. .field modCount:I
  72. .field root:Lcom/google/gson/internal/LinkedTreeMap$Node;
  73. .annotation system Ldalvik/annotation/Signature;
  74. value = {
  75. "Lcom/google/gson/internal/LinkedTreeMap$Node<",
  76. "TK;TV;>;"
  77. }
  78. .end annotation
  79. .end field
  80. .field size:I
  81. # direct methods
  82. .method static constructor <clinit>()V
  83. .locals 1
  84. const-class v0, Lcom/google/gson/internal/LinkedTreeMap;
  85. new-instance v0, Lcom/google/gson/internal/LinkedTreeMap$1;
  86. invoke-direct {v0}, Lcom/google/gson/internal/LinkedTreeMap$1;-><init>()V
  87. sput-object v0, Lcom/google/gson/internal/LinkedTreeMap;->NATURAL_ORDER:Ljava/util/Comparator;
  88. return-void
  89. .end method
  90. .method public constructor <init>()V
  91. .locals 1
  92. sget-object v0, Lcom/google/gson/internal/LinkedTreeMap;->NATURAL_ORDER:Ljava/util/Comparator;
  93. invoke-direct {p0, v0}, Lcom/google/gson/internal/LinkedTreeMap;-><init>(Ljava/util/Comparator;)V
  94. return-void
  95. .end method
  96. .method public constructor <init>(Ljava/util/Comparator;)V
  97. .locals 1
  98. .annotation system Ldalvik/annotation/Signature;
  99. value = {
  100. "(",
  101. "Ljava/util/Comparator<",
  102. "-TK;>;)V"
  103. }
  104. .end annotation
  105. invoke-direct {p0}, Ljava/util/AbstractMap;-><init>()V
  106. const/4 v0, 0x0
  107. iput v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->size:I
  108. iput v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->modCount:I
  109. new-instance v0, Lcom/google/gson/internal/LinkedTreeMap$Node;
  110. invoke-direct {v0}, Lcom/google/gson/internal/LinkedTreeMap$Node;-><init>()V
  111. iput-object v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->header:Lcom/google/gson/internal/LinkedTreeMap$Node;
  112. if-eqz p1, :cond_0
  113. goto :goto_0
  114. :cond_0
  115. sget-object p1, Lcom/google/gson/internal/LinkedTreeMap;->NATURAL_ORDER:Ljava/util/Comparator;
  116. :goto_0
  117. iput-object p1, p0, Lcom/google/gson/internal/LinkedTreeMap;->comparator:Ljava/util/Comparator;
  118. return-void
  119. .end method
  120. .method private equal(Ljava/lang/Object;Ljava/lang/Object;)Z
  121. .locals 0
  122. if-eq p1, p2, :cond_1
  123. if-eqz p1, :cond_0
  124. invoke-virtual {p1, p2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
  125. move-result p1
  126. if-eqz p1, :cond_0
  127. goto :goto_0
  128. :cond_0
  129. const/4 p1, 0x0
  130. goto :goto_1
  131. :cond_1
  132. :goto_0
  133. const/4 p1, 0x1
  134. :goto_1
  135. return p1
  136. .end method
  137. .method private rebalance(Lcom/google/gson/internal/LinkedTreeMap$Node;Z)V
  138. .locals 7
  139. .annotation system Ldalvik/annotation/Signature;
  140. value = {
  141. "(",
  142. "Lcom/google/gson/internal/LinkedTreeMap$Node<",
  143. "TK;TV;>;Z)V"
  144. }
  145. .end annotation
  146. :goto_0
  147. if-eqz p1, :cond_e
  148. iget-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
  149. iget-object v1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
  150. const/4 v2, 0x0
  151. if-eqz v0, :cond_0
  152. iget v3, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  153. goto :goto_1
  154. :cond_0
  155. const/4 v3, 0x0
  156. :goto_1
  157. if-eqz v1, :cond_1
  158. iget v4, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  159. goto :goto_2
  160. :cond_1
  161. const/4 v4, 0x0
  162. :goto_2
  163. sub-int v5, v3, v4
  164. const/4 v6, -0x2
  165. if-ne v5, v6, :cond_6
  166. iget-object v0, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
  167. iget-object v3, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
  168. if-eqz v3, :cond_2
  169. iget v3, v3, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  170. goto :goto_3
  171. :cond_2
  172. const/4 v3, 0x0
  173. :goto_3
  174. if-eqz v0, :cond_3
  175. iget v2, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  176. :cond_3
  177. sub-int/2addr v2, v3
  178. const/4 v0, -0x1
  179. if-eq v2, v0, :cond_5
  180. if-nez v2, :cond_4
  181. if-nez p2, :cond_4
  182. goto :goto_4
  183. :cond_4
  184. invoke-direct {p0, v1}, Lcom/google/gson/internal/LinkedTreeMap;->rotateRight(Lcom/google/gson/internal/LinkedTreeMap$Node;)V
  185. :cond_5
  186. :goto_4
  187. invoke-direct {p0, p1}, Lcom/google/gson/internal/LinkedTreeMap;->rotateLeft(Lcom/google/gson/internal/LinkedTreeMap$Node;)V
  188. if-eqz p2, :cond_d
  189. goto :goto_7
  190. :cond_6
  191. const/4 v1, 0x2
  192. const/4 v6, 0x1
  193. if-ne v5, v1, :cond_b
  194. iget-object v1, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
  195. iget-object v3, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
  196. if-eqz v3, :cond_7
  197. iget v3, v3, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  198. goto :goto_5
  199. :cond_7
  200. const/4 v3, 0x0
  201. :goto_5
  202. if-eqz v1, :cond_8
  203. iget v2, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  204. :cond_8
  205. sub-int/2addr v2, v3
  206. if-eq v2, v6, :cond_a
  207. if-nez v2, :cond_9
  208. if-nez p2, :cond_9
  209. goto :goto_6
  210. :cond_9
  211. invoke-direct {p0, v0}, Lcom/google/gson/internal/LinkedTreeMap;->rotateLeft(Lcom/google/gson/internal/LinkedTreeMap$Node;)V
  212. :cond_a
  213. :goto_6
  214. invoke-direct {p0, p1}, Lcom/google/gson/internal/LinkedTreeMap;->rotateRight(Lcom/google/gson/internal/LinkedTreeMap$Node;)V
  215. if-eqz p2, :cond_d
  216. goto :goto_7
  217. :cond_b
  218. if-nez v5, :cond_c
  219. add-int/lit8 v3, v3, 0x1
  220. iput v3, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  221. if-eqz p2, :cond_d
  222. goto :goto_7
  223. :cond_c
  224. invoke-static {v3, v4}, Ljava/lang/Math;->max(II)I
  225. move-result v0
  226. add-int/2addr v0, v6
  227. iput v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  228. if-nez p2, :cond_d
  229. goto :goto_7
  230. :cond_d
  231. iget-object p1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
  232. goto :goto_0
  233. :cond_e
  234. :goto_7
  235. return-void
  236. .end method
  237. .method private replaceInParent(Lcom/google/gson/internal/LinkedTreeMap$Node;Lcom/google/gson/internal/LinkedTreeMap$Node;)V
  238. .locals 2
  239. .annotation system Ldalvik/annotation/Signature;
  240. value = {
  241. "(",
  242. "Lcom/google/gson/internal/LinkedTreeMap$Node<",
  243. "TK;TV;>;",
  244. "Lcom/google/gson/internal/LinkedTreeMap$Node<",
  245. "TK;TV;>;)V"
  246. }
  247. .end annotation
  248. iget-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
  249. const/4 v1, 0x0
  250. iput-object v1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
  251. if-eqz p2, :cond_0
  252. iput-object v0, p2, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
  253. :cond_0
  254. if-eqz v0, :cond_2
  255. iget-object v1, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
  256. if-ne v1, p1, :cond_1
  257. iput-object p2, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
  258. goto :goto_0
  259. :cond_1
  260. iput-object p2, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
  261. goto :goto_0
  262. :cond_2
  263. iput-object p2, p0, Lcom/google/gson/internal/LinkedTreeMap;->root:Lcom/google/gson/internal/LinkedTreeMap$Node;
  264. :goto_0
  265. return-void
  266. .end method
  267. .method private rotateLeft(Lcom/google/gson/internal/LinkedTreeMap$Node;)V
  268. .locals 5
  269. .annotation system Ldalvik/annotation/Signature;
  270. value = {
  271. "(",
  272. "Lcom/google/gson/internal/LinkedTreeMap$Node<",
  273. "TK;TV;>;)V"
  274. }
  275. .end annotation
  276. iget-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
  277. iget-object v1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
  278. iget-object v2, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
  279. iget-object v3, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
  280. iput-object v2, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
  281. if-eqz v2, :cond_0
  282. iput-object p1, v2, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
  283. :cond_0
  284. invoke-direct {p0, p1, v1}, Lcom/google/gson/internal/LinkedTreeMap;->replaceInParent(Lcom/google/gson/internal/LinkedTreeMap$Node;Lcom/google/gson/internal/LinkedTreeMap$Node;)V
  285. iput-object p1, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
  286. iput-object v1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
  287. const/4 v4, 0x0
  288. if-eqz v0, :cond_1
  289. iget v0, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  290. goto :goto_0
  291. :cond_1
  292. const/4 v0, 0x0
  293. :goto_0
  294. if-eqz v2, :cond_2
  295. iget v2, v2, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  296. goto :goto_1
  297. :cond_2
  298. const/4 v2, 0x0
  299. :goto_1
  300. invoke-static {v0, v2}, Ljava/lang/Math;->max(II)I
  301. move-result v0
  302. add-int/lit8 v0, v0, 0x1
  303. iput v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  304. iget p1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  305. if-eqz v3, :cond_3
  306. iget v4, v3, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  307. :cond_3
  308. invoke-static {p1, v4}, Ljava/lang/Math;->max(II)I
  309. move-result p1
  310. add-int/lit8 p1, p1, 0x1
  311. iput p1, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  312. return-void
  313. .end method
  314. .method private rotateRight(Lcom/google/gson/internal/LinkedTreeMap$Node;)V
  315. .locals 5
  316. .annotation system Ldalvik/annotation/Signature;
  317. value = {
  318. "(",
  319. "Lcom/google/gson/internal/LinkedTreeMap$Node<",
  320. "TK;TV;>;)V"
  321. }
  322. .end annotation
  323. iget-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
  324. iget-object v1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
  325. iget-object v2, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
  326. iget-object v3, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
  327. iput-object v3, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
  328. if-eqz v3, :cond_0
  329. iput-object p1, v3, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
  330. :cond_0
  331. invoke-direct {p0, p1, v0}, Lcom/google/gson/internal/LinkedTreeMap;->replaceInParent(Lcom/google/gson/internal/LinkedTreeMap$Node;Lcom/google/gson/internal/LinkedTreeMap$Node;)V
  332. iput-object p1, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
  333. iput-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
  334. const/4 v4, 0x0
  335. if-eqz v1, :cond_1
  336. iget v1, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  337. goto :goto_0
  338. :cond_1
  339. const/4 v1, 0x0
  340. :goto_0
  341. if-eqz v3, :cond_2
  342. iget v3, v3, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  343. goto :goto_1
  344. :cond_2
  345. const/4 v3, 0x0
  346. :goto_1
  347. invoke-static {v1, v3}, Ljava/lang/Math;->max(II)I
  348. move-result v1
  349. add-int/lit8 v1, v1, 0x1
  350. iput v1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  351. iget p1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  352. if-eqz v2, :cond_3
  353. iget v4, v2, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  354. :cond_3
  355. invoke-static {p1, v4}, Ljava/lang/Math;->max(II)I
  356. move-result p1
  357. add-int/lit8 p1, p1, 0x1
  358. iput p1, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  359. return-void
  360. .end method
  361. .method private writeReplace()Ljava/lang/Object;
  362. .locals 1
  363. .annotation system Ldalvik/annotation/Throws;
  364. value = {
  365. Ljava/io/ObjectStreamException;
  366. }
  367. .end annotation
  368. new-instance v0, Ljava/util/LinkedHashMap;
  369. invoke-direct {v0, p0}, Ljava/util/LinkedHashMap;-><init>(Ljava/util/Map;)V
  370. return-object v0
  371. .end method
  372. # virtual methods
  373. .method public clear()V
  374. .locals 1
  375. const/4 v0, 0x0
  376. iput-object v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->root:Lcom/google/gson/internal/LinkedTreeMap$Node;
  377. const/4 v0, 0x0
  378. iput v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->size:I
  379. iget v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->modCount:I
  380. add-int/lit8 v0, v0, 0x1
  381. iput v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->modCount:I
  382. iget-object v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->header:Lcom/google/gson/internal/LinkedTreeMap$Node;
  383. iput-object v0, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->prev:Lcom/google/gson/internal/LinkedTreeMap$Node;
  384. iput-object v0, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->next:Lcom/google/gson/internal/LinkedTreeMap$Node;
  385. return-void
  386. .end method
  387. .method public containsKey(Ljava/lang/Object;)Z
  388. .locals 0
  389. invoke-virtual {p0, p1}, Lcom/google/gson/internal/LinkedTreeMap;->findByObject(Ljava/lang/Object;)Lcom/google/gson/internal/LinkedTreeMap$Node;
  390. move-result-object p1
  391. if-eqz p1, :cond_0
  392. const/4 p1, 0x1
  393. goto :goto_0
  394. :cond_0
  395. const/4 p1, 0x0
  396. :goto_0
  397. return p1
  398. .end method
  399. .method public entrySet()Ljava/util/Set;
  400. .locals 1
  401. .annotation system Ldalvik/annotation/Signature;
  402. value = {
  403. "()",
  404. "Ljava/util/Set<",
  405. "Ljava/util/Map$Entry<",
  406. "TK;TV;>;>;"
  407. }
  408. .end annotation
  409. iget-object v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->entrySet:Lcom/google/gson/internal/LinkedTreeMap$EntrySet;
  410. if-eqz v0, :cond_0
  411. goto :goto_0
  412. :cond_0
  413. new-instance v0, Lcom/google/gson/internal/LinkedTreeMap$EntrySet;
  414. invoke-direct {v0, p0}, Lcom/google/gson/internal/LinkedTreeMap$EntrySet;-><init>(Lcom/google/gson/internal/LinkedTreeMap;)V
  415. iput-object v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->entrySet:Lcom/google/gson/internal/LinkedTreeMap$EntrySet;
  416. :goto_0
  417. return-object v0
  418. .end method
  419. .method find(Ljava/lang/Object;Z)Lcom/google/gson/internal/LinkedTreeMap$Node;
  420. .locals 6
  421. .annotation system Ldalvik/annotation/Signature;
  422. value = {
  423. "(TK;Z)",
  424. "Lcom/google/gson/internal/LinkedTreeMap$Node<",
  425. "TK;TV;>;"
  426. }
  427. .end annotation
  428. iget-object v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->comparator:Ljava/util/Comparator;
  429. iget-object v1, p0, Lcom/google/gson/internal/LinkedTreeMap;->root:Lcom/google/gson/internal/LinkedTreeMap$Node;
  430. const/4 v2, 0x0
  431. if-eqz v1, :cond_5
  432. sget-object v3, Lcom/google/gson/internal/LinkedTreeMap;->NATURAL_ORDER:Ljava/util/Comparator;
  433. if-ne v0, v3, :cond_0
  434. move-object v3, p1
  435. check-cast v3, Ljava/lang/Comparable;
  436. goto :goto_0
  437. :cond_0
  438. move-object v3, v2
  439. :goto_0
  440. iget-object v4, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->key:Ljava/lang/Object;
  441. if-eqz v3, :cond_1
  442. invoke-interface {v3, v4}, Ljava/lang/Comparable;->compareTo(Ljava/lang/Object;)I
  443. move-result v4
  444. goto :goto_1
  445. :cond_1
  446. invoke-interface {v0, p1, v4}, Ljava/util/Comparator;->compare(Ljava/lang/Object;Ljava/lang/Object;)I
  447. move-result v4
  448. :goto_1
  449. if-nez v4, :cond_2
  450. return-object v1
  451. :cond_2
  452. if-gez v4, :cond_3
  453. iget-object v5, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
  454. goto :goto_2
  455. :cond_3
  456. iget-object v5, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
  457. :goto_2
  458. if-nez v5, :cond_4
  459. goto :goto_3
  460. :cond_4
  461. move-object v1, v5
  462. goto :goto_0
  463. :cond_5
  464. const/4 v4, 0x0
  465. :goto_3
  466. if-nez p2, :cond_6
  467. return-object v2
  468. :cond_6
  469. iget-object p2, p0, Lcom/google/gson/internal/LinkedTreeMap;->header:Lcom/google/gson/internal/LinkedTreeMap$Node;
  470. const/4 v2, 0x1
  471. if-nez v1, :cond_9
  472. sget-object v3, Lcom/google/gson/internal/LinkedTreeMap;->NATURAL_ORDER:Ljava/util/Comparator;
  473. if-ne v0, v3, :cond_8
  474. instance-of v0, p1, Ljava/lang/Comparable;
  475. if-eqz v0, :cond_7
  476. goto :goto_4
  477. :cond_7
  478. new-instance p2, Ljava/lang/ClassCastException;
  479. new-instance v0, Ljava/lang/StringBuilder;
  480. invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
  481. invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  482. move-result-object p1
  483. invoke-virtual {p1}, Ljava/lang/Class;->getName()Ljava/lang/String;
  484. move-result-object p1
  485. invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  486. const-string p1, " is not Comparable"
  487. invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  488. invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  489. move-result-object p1
  490. invoke-direct {p2, p1}, Ljava/lang/ClassCastException;-><init>(Ljava/lang/String;)V
  491. throw p2
  492. :cond_8
  493. :goto_4
  494. new-instance v0, Lcom/google/gson/internal/LinkedTreeMap$Node;
  495. iget-object v3, p2, Lcom/google/gson/internal/LinkedTreeMap$Node;->prev:Lcom/google/gson/internal/LinkedTreeMap$Node;
  496. invoke-direct {v0, v1, p1, p2, v3}, Lcom/google/gson/internal/LinkedTreeMap$Node;-><init>(Lcom/google/gson/internal/LinkedTreeMap$Node;Ljava/lang/Object;Lcom/google/gson/internal/LinkedTreeMap$Node;Lcom/google/gson/internal/LinkedTreeMap$Node;)V
  497. iput-object v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->root:Lcom/google/gson/internal/LinkedTreeMap$Node;
  498. goto :goto_6
  499. :cond_9
  500. new-instance v0, Lcom/google/gson/internal/LinkedTreeMap$Node;
  501. iget-object v3, p2, Lcom/google/gson/internal/LinkedTreeMap$Node;->prev:Lcom/google/gson/internal/LinkedTreeMap$Node;
  502. invoke-direct {v0, v1, p1, p2, v3}, Lcom/google/gson/internal/LinkedTreeMap$Node;-><init>(Lcom/google/gson/internal/LinkedTreeMap$Node;Ljava/lang/Object;Lcom/google/gson/internal/LinkedTreeMap$Node;Lcom/google/gson/internal/LinkedTreeMap$Node;)V
  503. if-gez v4, :cond_a
  504. iput-object v0, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
  505. goto :goto_5
  506. :cond_a
  507. iput-object v0, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
  508. :goto_5
  509. invoke-direct {p0, v1, v2}, Lcom/google/gson/internal/LinkedTreeMap;->rebalance(Lcom/google/gson/internal/LinkedTreeMap$Node;Z)V
  510. :goto_6
  511. iget p1, p0, Lcom/google/gson/internal/LinkedTreeMap;->size:I
  512. add-int/2addr p1, v2
  513. iput p1, p0, Lcom/google/gson/internal/LinkedTreeMap;->size:I
  514. iget p1, p0, Lcom/google/gson/internal/LinkedTreeMap;->modCount:I
  515. add-int/2addr p1, v2
  516. iput p1, p0, Lcom/google/gson/internal/LinkedTreeMap;->modCount:I
  517. return-object v0
  518. .end method
  519. .method findByEntry(Ljava/util/Map$Entry;)Lcom/google/gson/internal/LinkedTreeMap$Node;
  520. .locals 2
  521. .annotation system Ldalvik/annotation/Signature;
  522. value = {
  523. "(",
  524. "Ljava/util/Map$Entry<",
  525. "**>;)",
  526. "Lcom/google/gson/internal/LinkedTreeMap$Node<",
  527. "TK;TV;>;"
  528. }
  529. .end annotation
  530. invoke-interface {p1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
  531. move-result-object v0
  532. invoke-virtual {p0, v0}, Lcom/google/gson/internal/LinkedTreeMap;->findByObject(Ljava/lang/Object;)Lcom/google/gson/internal/LinkedTreeMap$Node;
  533. move-result-object v0
  534. if-eqz v0, :cond_0
  535. iget-object v1, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->value:Ljava/lang/Object;
  536. invoke-interface {p1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
  537. move-result-object p1
  538. invoke-direct {p0, v1, p1}, Lcom/google/gson/internal/LinkedTreeMap;->equal(Ljava/lang/Object;Ljava/lang/Object;)Z
  539. move-result p1
  540. if-eqz p1, :cond_0
  541. const/4 p1, 0x1
  542. goto :goto_0
  543. :cond_0
  544. const/4 p1, 0x0
  545. :goto_0
  546. if-eqz p1, :cond_1
  547. goto :goto_1
  548. :cond_1
  549. const/4 v0, 0x0
  550. :goto_1
  551. return-object v0
  552. .end method
  553. .method findByObject(Ljava/lang/Object;)Lcom/google/gson/internal/LinkedTreeMap$Node;
  554. .locals 2
  555. .annotation system Ldalvik/annotation/Signature;
  556. value = {
  557. "(",
  558. "Ljava/lang/Object;",
  559. ")",
  560. "Lcom/google/gson/internal/LinkedTreeMap$Node<",
  561. "TK;TV;>;"
  562. }
  563. .end annotation
  564. const/4 v0, 0x0
  565. if-eqz p1, :cond_0
  566. const/4 v1, 0x0
  567. :try_start_0
  568. invoke-virtual {p0, p1, v1}, Lcom/google/gson/internal/LinkedTreeMap;->find(Ljava/lang/Object;Z)Lcom/google/gson/internal/LinkedTreeMap$Node;
  569. move-result-object v0
  570. :try_end_0
  571. .catch Ljava/lang/ClassCastException; {:try_start_0 .. :try_end_0} :catch_0
  572. nop
  573. :catch_0
  574. :cond_0
  575. return-object v0
  576. .end method
  577. .method public get(Ljava/lang/Object;)Ljava/lang/Object;
  578. .locals 0
  579. .annotation system Ldalvik/annotation/Signature;
  580. value = {
  581. "(",
  582. "Ljava/lang/Object;",
  583. ")TV;"
  584. }
  585. .end annotation
  586. invoke-virtual {p0, p1}, Lcom/google/gson/internal/LinkedTreeMap;->findByObject(Ljava/lang/Object;)Lcom/google/gson/internal/LinkedTreeMap$Node;
  587. move-result-object p1
  588. if-eqz p1, :cond_0
  589. iget-object p1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->value:Ljava/lang/Object;
  590. goto :goto_0
  591. :cond_0
  592. const/4 p1, 0x0
  593. :goto_0
  594. return-object p1
  595. .end method
  596. .method public keySet()Ljava/util/Set;
  597. .locals 1
  598. .annotation system Ldalvik/annotation/Signature;
  599. value = {
  600. "()",
  601. "Ljava/util/Set<",
  602. "TK;>;"
  603. }
  604. .end annotation
  605. iget-object v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->keySet:Lcom/google/gson/internal/LinkedTreeMap$KeySet;
  606. if-eqz v0, :cond_0
  607. goto :goto_0
  608. :cond_0
  609. new-instance v0, Lcom/google/gson/internal/LinkedTreeMap$KeySet;
  610. invoke-direct {v0, p0}, Lcom/google/gson/internal/LinkedTreeMap$KeySet;-><init>(Lcom/google/gson/internal/LinkedTreeMap;)V
  611. iput-object v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->keySet:Lcom/google/gson/internal/LinkedTreeMap$KeySet;
  612. :goto_0
  613. return-object v0
  614. .end method
  615. .method public put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
  616. .locals 1
  617. .annotation system Ldalvik/annotation/Signature;
  618. value = {
  619. "(TK;TV;)TV;"
  620. }
  621. .end annotation
  622. if-eqz p1, :cond_0
  623. const/4 v0, 0x1
  624. invoke-virtual {p0, p1, v0}, Lcom/google/gson/internal/LinkedTreeMap;->find(Ljava/lang/Object;Z)Lcom/google/gson/internal/LinkedTreeMap$Node;
  625. move-result-object p1
  626. iget-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->value:Ljava/lang/Object;
  627. iput-object p2, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->value:Ljava/lang/Object;
  628. return-object v0
  629. :cond_0
  630. new-instance p1, Ljava/lang/NullPointerException;
  631. const-string p2, "key == null"
  632. invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  633. throw p1
  634. .end method
  635. .method public remove(Ljava/lang/Object;)Ljava/lang/Object;
  636. .locals 0
  637. .annotation system Ldalvik/annotation/Signature;
  638. value = {
  639. "(",
  640. "Ljava/lang/Object;",
  641. ")TV;"
  642. }
  643. .end annotation
  644. invoke-virtual {p0, p1}, Lcom/google/gson/internal/LinkedTreeMap;->removeInternalByKey(Ljava/lang/Object;)Lcom/google/gson/internal/LinkedTreeMap$Node;
  645. move-result-object p1
  646. if-eqz p1, :cond_0
  647. iget-object p1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->value:Ljava/lang/Object;
  648. goto :goto_0
  649. :cond_0
  650. const/4 p1, 0x0
  651. :goto_0
  652. return-object p1
  653. .end method
  654. .method removeInternal(Lcom/google/gson/internal/LinkedTreeMap$Node;Z)V
  655. .locals 5
  656. .annotation system Ldalvik/annotation/Signature;
  657. value = {
  658. "(",
  659. "Lcom/google/gson/internal/LinkedTreeMap$Node<",
  660. "TK;TV;>;Z)V"
  661. }
  662. .end annotation
  663. if-eqz p2, :cond_0
  664. iget-object p2, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->prev:Lcom/google/gson/internal/LinkedTreeMap$Node;
  665. iget-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->next:Lcom/google/gson/internal/LinkedTreeMap$Node;
  666. iput-object v0, p2, Lcom/google/gson/internal/LinkedTreeMap$Node;->next:Lcom/google/gson/internal/LinkedTreeMap$Node;
  667. iget-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->next:Lcom/google/gson/internal/LinkedTreeMap$Node;
  668. iput-object p2, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->prev:Lcom/google/gson/internal/LinkedTreeMap$Node;
  669. :cond_0
  670. iget-object p2, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
  671. iget-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
  672. iget-object v1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
  673. const/4 v2, 0x0
  674. const/4 v3, 0x0
  675. if-eqz p2, :cond_4
  676. if-eqz v0, :cond_4
  677. iget v1, p2, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  678. iget v4, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  679. if-le v1, v4, :cond_1
  680. invoke-virtual {p2}, Lcom/google/gson/internal/LinkedTreeMap$Node;->last()Lcom/google/gson/internal/LinkedTreeMap$Node;
  681. move-result-object p2
  682. goto :goto_0
  683. :cond_1
  684. invoke-virtual {v0}, Lcom/google/gson/internal/LinkedTreeMap$Node;->first()Lcom/google/gson/internal/LinkedTreeMap$Node;
  685. move-result-object p2
  686. :goto_0
  687. invoke-virtual {p0, p2, v2}, Lcom/google/gson/internal/LinkedTreeMap;->removeInternal(Lcom/google/gson/internal/LinkedTreeMap$Node;Z)V
  688. iget-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
  689. if-eqz v0, :cond_2
  690. iget v1, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  691. iput-object v0, p2, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
  692. iput-object p2, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
  693. iput-object v3, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
  694. goto :goto_1
  695. :cond_2
  696. const/4 v1, 0x0
  697. :goto_1
  698. iget-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
  699. if-eqz v0, :cond_3
  700. iget v2, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  701. iput-object v0, p2, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
  702. iput-object p2, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
  703. iput-object v3, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
  704. :cond_3
  705. invoke-static {v1, v2}, Ljava/lang/Math;->max(II)I
  706. move-result v0
  707. add-int/lit8 v0, v0, 0x1
  708. iput v0, p2, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
  709. invoke-direct {p0, p1, p2}, Lcom/google/gson/internal/LinkedTreeMap;->replaceInParent(Lcom/google/gson/internal/LinkedTreeMap$Node;Lcom/google/gson/internal/LinkedTreeMap$Node;)V
  710. return-void
  711. :cond_4
  712. if-eqz p2, :cond_5
  713. invoke-direct {p0, p1, p2}, Lcom/google/gson/internal/LinkedTreeMap;->replaceInParent(Lcom/google/gson/internal/LinkedTreeMap$Node;Lcom/google/gson/internal/LinkedTreeMap$Node;)V
  714. iput-object v3, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
  715. goto :goto_2
  716. :cond_5
  717. if-eqz v0, :cond_6
  718. invoke-direct {p0, p1, v0}, Lcom/google/gson/internal/LinkedTreeMap;->replaceInParent(Lcom/google/gson/internal/LinkedTreeMap$Node;Lcom/google/gson/internal/LinkedTreeMap$Node;)V
  719. iput-object v3, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
  720. goto :goto_2
  721. :cond_6
  722. invoke-direct {p0, p1, v3}, Lcom/google/gson/internal/LinkedTreeMap;->replaceInParent(Lcom/google/gson/internal/LinkedTreeMap$Node;Lcom/google/gson/internal/LinkedTreeMap$Node;)V
  723. :goto_2
  724. invoke-direct {p0, v1, v2}, Lcom/google/gson/internal/LinkedTreeMap;->rebalance(Lcom/google/gson/internal/LinkedTreeMap$Node;Z)V
  725. iget p1, p0, Lcom/google/gson/internal/LinkedTreeMap;->size:I
  726. add-int/lit8 p1, p1, -0x1
  727. iput p1, p0, Lcom/google/gson/internal/LinkedTreeMap;->size:I
  728. iget p1, p0, Lcom/google/gson/internal/LinkedTreeMap;->modCount:I
  729. add-int/lit8 p1, p1, 0x1
  730. iput p1, p0, Lcom/google/gson/internal/LinkedTreeMap;->modCount:I
  731. return-void
  732. .end method
  733. .method removeInternalByKey(Ljava/lang/Object;)Lcom/google/gson/internal/LinkedTreeMap$Node;
  734. .locals 1
  735. .annotation system Ldalvik/annotation/Signature;
  736. value = {
  737. "(",
  738. "Ljava/lang/Object;",
  739. ")",
  740. "Lcom/google/gson/internal/LinkedTreeMap$Node<",
  741. "TK;TV;>;"
  742. }
  743. .end annotation
  744. invoke-virtual {p0, p1}, Lcom/google/gson/internal/LinkedTreeMap;->findByObject(Ljava/lang/Object;)Lcom/google/gson/internal/LinkedTreeMap$Node;
  745. move-result-object p1
  746. if-eqz p1, :cond_0
  747. const/4 v0, 0x1
  748. invoke-virtual {p0, p1, v0}, Lcom/google/gson/internal/LinkedTreeMap;->removeInternal(Lcom/google/gson/internal/LinkedTreeMap$Node;Z)V
  749. :cond_0
  750. return-object p1
  751. .end method
  752. .method public size()I
  753. .locals 1
  754. iget v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->size:I
  755. return v0
  756. .end method