LinkedHashTreeMap.smali 41 KB

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