1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192 |
- .class public final Lcom/google/gson/internal/LinkedTreeMap;
- .super Ljava/util/AbstractMap;
- .source ""
- # interfaces
- .implements Ljava/io/Serializable;
- # annotations
- .annotation system Ldalvik/annotation/MemberClasses;
- value = {
- Lcom/google/gson/internal/LinkedTreeMap$KeySet;,
- Lcom/google/gson/internal/LinkedTreeMap$EntrySet;,
- Lcom/google/gson/internal/LinkedTreeMap$LinkedTreeMapIterator;,
- Lcom/google/gson/internal/LinkedTreeMap$Node;
- }
- .end annotation
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "<K:",
- "Ljava/lang/Object;",
- "V:",
- "Ljava/lang/Object;",
- ">",
- "Ljava/util/AbstractMap<",
- "TK;TV;>;",
- "Ljava/io/Serializable;"
- }
- .end annotation
- # static fields
- .field static final synthetic $assertionsDisabled:Z
- .field private static final NATURAL_ORDER:Ljava/util/Comparator;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Ljava/util/Comparator<",
- "Ljava/lang/Comparable;",
- ">;"
- }
- .end annotation
- .end field
- # instance fields
- .field comparator:Ljava/util/Comparator;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Ljava/util/Comparator<",
- "-TK;>;"
- }
- .end annotation
- .end field
- .field private entrySet:Lcom/google/gson/internal/LinkedTreeMap$EntrySet;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Lcom/google/gson/internal/LinkedTreeMap<",
- "TK;TV;>.EntrySet;"
- }
- .end annotation
- .end field
- .field final header:Lcom/google/gson/internal/LinkedTreeMap$Node;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Lcom/google/gson/internal/LinkedTreeMap$Node<",
- "TK;TV;>;"
- }
- .end annotation
- .end field
- .field private keySet:Lcom/google/gson/internal/LinkedTreeMap$KeySet;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Lcom/google/gson/internal/LinkedTreeMap<",
- "TK;TV;>.KeySet;"
- }
- .end annotation
- .end field
- .field modCount:I
- .field root:Lcom/google/gson/internal/LinkedTreeMap$Node;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Lcom/google/gson/internal/LinkedTreeMap$Node<",
- "TK;TV;>;"
- }
- .end annotation
- .end field
- .field size:I
- # direct methods
- .method static constructor <clinit>()V
- .locals 1
- const-class v0, Lcom/google/gson/internal/LinkedTreeMap;
- new-instance v0, Lcom/google/gson/internal/LinkedTreeMap$1;
- invoke-direct {v0}, Lcom/google/gson/internal/LinkedTreeMap$1;-><init>()V
- sput-object v0, Lcom/google/gson/internal/LinkedTreeMap;->NATURAL_ORDER:Ljava/util/Comparator;
- return-void
- .end method
- .method public constructor <init>()V
- .locals 1
- sget-object v0, Lcom/google/gson/internal/LinkedTreeMap;->NATURAL_ORDER:Ljava/util/Comparator;
- invoke-direct {p0, v0}, Lcom/google/gson/internal/LinkedTreeMap;-><init>(Ljava/util/Comparator;)V
- return-void
- .end method
- .method public constructor <init>(Ljava/util/Comparator;)V
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Ljava/util/Comparator<",
- "-TK;>;)V"
- }
- .end annotation
- invoke-direct {p0}, Ljava/util/AbstractMap;-><init>()V
- const/4 v0, 0x0
- iput v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->size:I
- iput v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->modCount:I
- new-instance v0, Lcom/google/gson/internal/LinkedTreeMap$Node;
- invoke-direct {v0}, Lcom/google/gson/internal/LinkedTreeMap$Node;-><init>()V
- iput-object v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->header:Lcom/google/gson/internal/LinkedTreeMap$Node;
- if-eqz p1, :cond_0
- goto :goto_0
- :cond_0
- sget-object p1, Lcom/google/gson/internal/LinkedTreeMap;->NATURAL_ORDER:Ljava/util/Comparator;
- :goto_0
- iput-object p1, p0, Lcom/google/gson/internal/LinkedTreeMap;->comparator:Ljava/util/Comparator;
- return-void
- .end method
- .method private equal(Ljava/lang/Object;Ljava/lang/Object;)Z
- .locals 0
- if-eq p1, p2, :cond_1
- if-eqz p1, :cond_0
- invoke-virtual {p1, p2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
- move-result p1
- if-eqz p1, :cond_0
- goto :goto_0
- :cond_0
- const/4 p1, 0x0
- goto :goto_1
- :cond_1
- :goto_0
- const/4 p1, 0x1
- :goto_1
- return p1
- .end method
- .method private rebalance(Lcom/google/gson/internal/LinkedTreeMap$Node;Z)V
- .locals 7
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Lcom/google/gson/internal/LinkedTreeMap$Node<",
- "TK;TV;>;Z)V"
- }
- .end annotation
- :goto_0
- if-eqz p1, :cond_e
- iget-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iget-object v1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
- const/4 v2, 0x0
- if-eqz v0, :cond_0
- iget v3, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- goto :goto_1
- :cond_0
- const/4 v3, 0x0
- :goto_1
- if-eqz v1, :cond_1
- iget v4, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- goto :goto_2
- :cond_1
- const/4 v4, 0x0
- :goto_2
- sub-int v5, v3, v4
- const/4 v6, -0x2
- if-ne v5, v6, :cond_6
- iget-object v0, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iget-object v3, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
- if-eqz v3, :cond_2
- iget v3, v3, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- goto :goto_3
- :cond_2
- const/4 v3, 0x0
- :goto_3
- if-eqz v0, :cond_3
- iget v2, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- :cond_3
- sub-int/2addr v2, v3
- const/4 v0, -0x1
- if-eq v2, v0, :cond_5
- if-nez v2, :cond_4
- if-nez p2, :cond_4
- goto :goto_4
- :cond_4
- invoke-direct {p0, v1}, Lcom/google/gson/internal/LinkedTreeMap;->rotateRight(Lcom/google/gson/internal/LinkedTreeMap$Node;)V
- :cond_5
- :goto_4
- invoke-direct {p0, p1}, Lcom/google/gson/internal/LinkedTreeMap;->rotateLeft(Lcom/google/gson/internal/LinkedTreeMap$Node;)V
- if-eqz p2, :cond_d
- goto :goto_7
- :cond_6
- const/4 v1, 0x2
- const/4 v6, 0x1
- if-ne v5, v1, :cond_b
- iget-object v1, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iget-object v3, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
- if-eqz v3, :cond_7
- iget v3, v3, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- goto :goto_5
- :cond_7
- const/4 v3, 0x0
- :goto_5
- if-eqz v1, :cond_8
- iget v2, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- :cond_8
- sub-int/2addr v2, v3
- if-eq v2, v6, :cond_a
- if-nez v2, :cond_9
- if-nez p2, :cond_9
- goto :goto_6
- :cond_9
- invoke-direct {p0, v0}, Lcom/google/gson/internal/LinkedTreeMap;->rotateLeft(Lcom/google/gson/internal/LinkedTreeMap$Node;)V
- :cond_a
- :goto_6
- invoke-direct {p0, p1}, Lcom/google/gson/internal/LinkedTreeMap;->rotateRight(Lcom/google/gson/internal/LinkedTreeMap$Node;)V
- if-eqz p2, :cond_d
- goto :goto_7
- :cond_b
- if-nez v5, :cond_c
- add-int/lit8 v3, v3, 0x1
- iput v3, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- if-eqz p2, :cond_d
- goto :goto_7
- :cond_c
- invoke-static {v3, v4}, Ljava/lang/Math;->max(II)I
- move-result v0
- add-int/2addr v0, v6
- iput v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- if-nez p2, :cond_d
- goto :goto_7
- :cond_d
- iget-object p1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
- goto :goto_0
- :cond_e
- :goto_7
- return-void
- .end method
- .method private replaceInParent(Lcom/google/gson/internal/LinkedTreeMap$Node;Lcom/google/gson/internal/LinkedTreeMap$Node;)V
- .locals 2
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Lcom/google/gson/internal/LinkedTreeMap$Node<",
- "TK;TV;>;",
- "Lcom/google/gson/internal/LinkedTreeMap$Node<",
- "TK;TV;>;)V"
- }
- .end annotation
- iget-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
- const/4 v1, 0x0
- iput-object v1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
- if-eqz p2, :cond_0
- iput-object v0, p2, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
- :cond_0
- if-eqz v0, :cond_2
- iget-object v1, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
- if-ne v1, p1, :cond_1
- iput-object p2, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
- goto :goto_0
- :cond_1
- iput-object p2, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
- goto :goto_0
- :cond_2
- iput-object p2, p0, Lcom/google/gson/internal/LinkedTreeMap;->root:Lcom/google/gson/internal/LinkedTreeMap$Node;
- :goto_0
- return-void
- .end method
- .method private rotateLeft(Lcom/google/gson/internal/LinkedTreeMap$Node;)V
- .locals 5
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Lcom/google/gson/internal/LinkedTreeMap$Node<",
- "TK;TV;>;)V"
- }
- .end annotation
- iget-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iget-object v1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iget-object v2, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iget-object v3, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iput-object v2, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
- if-eqz v2, :cond_0
- iput-object p1, v2, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
- :cond_0
- invoke-direct {p0, p1, v1}, Lcom/google/gson/internal/LinkedTreeMap;->replaceInParent(Lcom/google/gson/internal/LinkedTreeMap$Node;Lcom/google/gson/internal/LinkedTreeMap$Node;)V
- iput-object p1, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iput-object v1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
- const/4 v4, 0x0
- if-eqz v0, :cond_1
- iget v0, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- goto :goto_0
- :cond_1
- const/4 v0, 0x0
- :goto_0
- if-eqz v2, :cond_2
- iget v2, v2, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- goto :goto_1
- :cond_2
- const/4 v2, 0x0
- :goto_1
- invoke-static {v0, v2}, Ljava/lang/Math;->max(II)I
- move-result v0
- add-int/lit8 v0, v0, 0x1
- iput v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- iget p1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- if-eqz v3, :cond_3
- iget v4, v3, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- :cond_3
- invoke-static {p1, v4}, Ljava/lang/Math;->max(II)I
- move-result p1
- add-int/lit8 p1, p1, 0x1
- iput p1, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- return-void
- .end method
- .method private rotateRight(Lcom/google/gson/internal/LinkedTreeMap$Node;)V
- .locals 5
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Lcom/google/gson/internal/LinkedTreeMap$Node<",
- "TK;TV;>;)V"
- }
- .end annotation
- iget-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iget-object v1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iget-object v2, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iget-object v3, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iput-object v3, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
- if-eqz v3, :cond_0
- iput-object p1, v3, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
- :cond_0
- invoke-direct {p0, p1, v0}, Lcom/google/gson/internal/LinkedTreeMap;->replaceInParent(Lcom/google/gson/internal/LinkedTreeMap$Node;Lcom/google/gson/internal/LinkedTreeMap$Node;)V
- iput-object p1, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iput-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
- const/4 v4, 0x0
- if-eqz v1, :cond_1
- iget v1, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- goto :goto_0
- :cond_1
- const/4 v1, 0x0
- :goto_0
- if-eqz v3, :cond_2
- iget v3, v3, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- goto :goto_1
- :cond_2
- const/4 v3, 0x0
- :goto_1
- invoke-static {v1, v3}, Ljava/lang/Math;->max(II)I
- move-result v1
- add-int/lit8 v1, v1, 0x1
- iput v1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- iget p1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- if-eqz v2, :cond_3
- iget v4, v2, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- :cond_3
- invoke-static {p1, v4}, Ljava/lang/Math;->max(II)I
- move-result p1
- add-int/lit8 p1, p1, 0x1
- iput p1, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- return-void
- .end method
- .method private writeReplace()Ljava/lang/Object;
- .locals 1
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/ObjectStreamException;
- }
- .end annotation
- new-instance v0, Ljava/util/LinkedHashMap;
- invoke-direct {v0, p0}, Ljava/util/LinkedHashMap;-><init>(Ljava/util/Map;)V
- return-object v0
- .end method
- # virtual methods
- .method public clear()V
- .locals 1
- const/4 v0, 0x0
- iput-object v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->root:Lcom/google/gson/internal/LinkedTreeMap$Node;
- const/4 v0, 0x0
- iput v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->size:I
- iget v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->modCount:I
- add-int/lit8 v0, v0, 0x1
- iput v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->modCount:I
- iget-object v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->header:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iput-object v0, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->prev:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iput-object v0, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->next:Lcom/google/gson/internal/LinkedTreeMap$Node;
- return-void
- .end method
- .method public containsKey(Ljava/lang/Object;)Z
- .locals 0
- invoke-virtual {p0, p1}, Lcom/google/gson/internal/LinkedTreeMap;->findByObject(Ljava/lang/Object;)Lcom/google/gson/internal/LinkedTreeMap$Node;
- move-result-object p1
- if-eqz p1, :cond_0
- const/4 p1, 0x1
- goto :goto_0
- :cond_0
- const/4 p1, 0x0
- :goto_0
- return p1
- .end method
- .method public entrySet()Ljava/util/Set;
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "()",
- "Ljava/util/Set<",
- "Ljava/util/Map$Entry<",
- "TK;TV;>;>;"
- }
- .end annotation
- iget-object v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->entrySet:Lcom/google/gson/internal/LinkedTreeMap$EntrySet;
- if-eqz v0, :cond_0
- goto :goto_0
- :cond_0
- new-instance v0, Lcom/google/gson/internal/LinkedTreeMap$EntrySet;
- invoke-direct {v0, p0}, Lcom/google/gson/internal/LinkedTreeMap$EntrySet;-><init>(Lcom/google/gson/internal/LinkedTreeMap;)V
- iput-object v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->entrySet:Lcom/google/gson/internal/LinkedTreeMap$EntrySet;
- :goto_0
- return-object v0
- .end method
- .method find(Ljava/lang/Object;Z)Lcom/google/gson/internal/LinkedTreeMap$Node;
- .locals 6
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(TK;Z)",
- "Lcom/google/gson/internal/LinkedTreeMap$Node<",
- "TK;TV;>;"
- }
- .end annotation
- iget-object v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->comparator:Ljava/util/Comparator;
- iget-object v1, p0, Lcom/google/gson/internal/LinkedTreeMap;->root:Lcom/google/gson/internal/LinkedTreeMap$Node;
- const/4 v2, 0x0
- if-eqz v1, :cond_5
- sget-object v3, Lcom/google/gson/internal/LinkedTreeMap;->NATURAL_ORDER:Ljava/util/Comparator;
- if-ne v0, v3, :cond_0
- move-object v3, p1
- check-cast v3, Ljava/lang/Comparable;
- goto :goto_0
- :cond_0
- move-object v3, v2
- :goto_0
- iget-object v4, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->key:Ljava/lang/Object;
- if-eqz v3, :cond_1
- invoke-interface {v3, v4}, Ljava/lang/Comparable;->compareTo(Ljava/lang/Object;)I
- move-result v4
- goto :goto_1
- :cond_1
- invoke-interface {v0, p1, v4}, Ljava/util/Comparator;->compare(Ljava/lang/Object;Ljava/lang/Object;)I
- move-result v4
- :goto_1
- if-nez v4, :cond_2
- return-object v1
- :cond_2
- if-gez v4, :cond_3
- iget-object v5, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
- goto :goto_2
- :cond_3
- iget-object v5, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
- :goto_2
- if-nez v5, :cond_4
- goto :goto_3
- :cond_4
- move-object v1, v5
- goto :goto_0
- :cond_5
- const/4 v4, 0x0
- :goto_3
- if-nez p2, :cond_6
- return-object v2
- :cond_6
- iget-object p2, p0, Lcom/google/gson/internal/LinkedTreeMap;->header:Lcom/google/gson/internal/LinkedTreeMap$Node;
- const/4 v2, 0x1
- if-nez v1, :cond_9
- sget-object v3, Lcom/google/gson/internal/LinkedTreeMap;->NATURAL_ORDER:Ljava/util/Comparator;
- if-ne v0, v3, :cond_8
- instance-of v0, p1, Ljava/lang/Comparable;
- if-eqz v0, :cond_7
- goto :goto_4
- :cond_7
- new-instance p2, Ljava/lang/ClassCastException;
- new-instance v0, Ljava/lang/StringBuilder;
- invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
- invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
- move-result-object p1
- invoke-virtual {p1}, Ljava/lang/Class;->getName()Ljava/lang/String;
- move-result-object p1
- invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- const-string p1, " is not Comparable"
- invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object p1
- invoke-direct {p2, p1}, Ljava/lang/ClassCastException;-><init>(Ljava/lang/String;)V
- throw p2
- :cond_8
- :goto_4
- new-instance v0, Lcom/google/gson/internal/LinkedTreeMap$Node;
- iget-object v3, p2, Lcom/google/gson/internal/LinkedTreeMap$Node;->prev:Lcom/google/gson/internal/LinkedTreeMap$Node;
- 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
- iput-object v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->root:Lcom/google/gson/internal/LinkedTreeMap$Node;
- goto :goto_6
- :cond_9
- new-instance v0, Lcom/google/gson/internal/LinkedTreeMap$Node;
- iget-object v3, p2, Lcom/google/gson/internal/LinkedTreeMap$Node;->prev:Lcom/google/gson/internal/LinkedTreeMap$Node;
- 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
- if-gez v4, :cond_a
- iput-object v0, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
- goto :goto_5
- :cond_a
- iput-object v0, v1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
- :goto_5
- invoke-direct {p0, v1, v2}, Lcom/google/gson/internal/LinkedTreeMap;->rebalance(Lcom/google/gson/internal/LinkedTreeMap$Node;Z)V
- :goto_6
- iget p1, p0, Lcom/google/gson/internal/LinkedTreeMap;->size:I
- add-int/2addr p1, v2
- iput p1, p0, Lcom/google/gson/internal/LinkedTreeMap;->size:I
- iget p1, p0, Lcom/google/gson/internal/LinkedTreeMap;->modCount:I
- add-int/2addr p1, v2
- iput p1, p0, Lcom/google/gson/internal/LinkedTreeMap;->modCount:I
- return-object v0
- .end method
- .method findByEntry(Ljava/util/Map$Entry;)Lcom/google/gson/internal/LinkedTreeMap$Node;
- .locals 2
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Ljava/util/Map$Entry<",
- "**>;)",
- "Lcom/google/gson/internal/LinkedTreeMap$Node<",
- "TK;TV;>;"
- }
- .end annotation
- invoke-interface {p1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
- move-result-object v0
- invoke-virtual {p0, v0}, Lcom/google/gson/internal/LinkedTreeMap;->findByObject(Ljava/lang/Object;)Lcom/google/gson/internal/LinkedTreeMap$Node;
- move-result-object v0
- if-eqz v0, :cond_0
- iget-object v1, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->value:Ljava/lang/Object;
- invoke-interface {p1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
- move-result-object p1
- invoke-direct {p0, v1, p1}, Lcom/google/gson/internal/LinkedTreeMap;->equal(Ljava/lang/Object;Ljava/lang/Object;)Z
- move-result p1
- if-eqz p1, :cond_0
- const/4 p1, 0x1
- goto :goto_0
- :cond_0
- const/4 p1, 0x0
- :goto_0
- if-eqz p1, :cond_1
- goto :goto_1
- :cond_1
- const/4 v0, 0x0
- :goto_1
- return-object v0
- .end method
- .method findByObject(Ljava/lang/Object;)Lcom/google/gson/internal/LinkedTreeMap$Node;
- .locals 2
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Ljava/lang/Object;",
- ")",
- "Lcom/google/gson/internal/LinkedTreeMap$Node<",
- "TK;TV;>;"
- }
- .end annotation
- const/4 v0, 0x0
- if-eqz p1, :cond_0
- const/4 v1, 0x0
- :try_start_0
- invoke-virtual {p0, p1, v1}, Lcom/google/gson/internal/LinkedTreeMap;->find(Ljava/lang/Object;Z)Lcom/google/gson/internal/LinkedTreeMap$Node;
- move-result-object v0
- :try_end_0
- .catch Ljava/lang/ClassCastException; {:try_start_0 .. :try_end_0} :catch_0
- nop
- :catch_0
- :cond_0
- return-object v0
- .end method
- .method public get(Ljava/lang/Object;)Ljava/lang/Object;
- .locals 0
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Ljava/lang/Object;",
- ")TV;"
- }
- .end annotation
- invoke-virtual {p0, p1}, Lcom/google/gson/internal/LinkedTreeMap;->findByObject(Ljava/lang/Object;)Lcom/google/gson/internal/LinkedTreeMap$Node;
- move-result-object p1
- if-eqz p1, :cond_0
- iget-object p1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->value:Ljava/lang/Object;
- goto :goto_0
- :cond_0
- const/4 p1, 0x0
- :goto_0
- return-object p1
- .end method
- .method public keySet()Ljava/util/Set;
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "()",
- "Ljava/util/Set<",
- "TK;>;"
- }
- .end annotation
- iget-object v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->keySet:Lcom/google/gson/internal/LinkedTreeMap$KeySet;
- if-eqz v0, :cond_0
- goto :goto_0
- :cond_0
- new-instance v0, Lcom/google/gson/internal/LinkedTreeMap$KeySet;
- invoke-direct {v0, p0}, Lcom/google/gson/internal/LinkedTreeMap$KeySet;-><init>(Lcom/google/gson/internal/LinkedTreeMap;)V
- iput-object v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->keySet:Lcom/google/gson/internal/LinkedTreeMap$KeySet;
- :goto_0
- return-object v0
- .end method
- .method public put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(TK;TV;)TV;"
- }
- .end annotation
- if-eqz p1, :cond_0
- const/4 v0, 0x1
- invoke-virtual {p0, p1, v0}, Lcom/google/gson/internal/LinkedTreeMap;->find(Ljava/lang/Object;Z)Lcom/google/gson/internal/LinkedTreeMap$Node;
- move-result-object p1
- iget-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->value:Ljava/lang/Object;
- iput-object p2, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->value:Ljava/lang/Object;
- return-object v0
- :cond_0
- new-instance p1, Ljava/lang/NullPointerException;
- const-string p2, "key == null"
- invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
- throw p1
- .end method
- .method public remove(Ljava/lang/Object;)Ljava/lang/Object;
- .locals 0
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Ljava/lang/Object;",
- ")TV;"
- }
- .end annotation
- invoke-virtual {p0, p1}, Lcom/google/gson/internal/LinkedTreeMap;->removeInternalByKey(Ljava/lang/Object;)Lcom/google/gson/internal/LinkedTreeMap$Node;
- move-result-object p1
- if-eqz p1, :cond_0
- iget-object p1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->value:Ljava/lang/Object;
- goto :goto_0
- :cond_0
- const/4 p1, 0x0
- :goto_0
- return-object p1
- .end method
- .method removeInternal(Lcom/google/gson/internal/LinkedTreeMap$Node;Z)V
- .locals 5
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Lcom/google/gson/internal/LinkedTreeMap$Node<",
- "TK;TV;>;Z)V"
- }
- .end annotation
- if-eqz p2, :cond_0
- iget-object p2, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->prev:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iget-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->next:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iput-object v0, p2, Lcom/google/gson/internal/LinkedTreeMap$Node;->next:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iget-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->next:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iput-object p2, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->prev:Lcom/google/gson/internal/LinkedTreeMap$Node;
- :cond_0
- iget-object p2, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iget-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iget-object v1, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
- const/4 v2, 0x0
- const/4 v3, 0x0
- if-eqz p2, :cond_4
- if-eqz v0, :cond_4
- iget v1, p2, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- iget v4, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- if-le v1, v4, :cond_1
- invoke-virtual {p2}, Lcom/google/gson/internal/LinkedTreeMap$Node;->last()Lcom/google/gson/internal/LinkedTreeMap$Node;
- move-result-object p2
- goto :goto_0
- :cond_1
- invoke-virtual {v0}, Lcom/google/gson/internal/LinkedTreeMap$Node;->first()Lcom/google/gson/internal/LinkedTreeMap$Node;
- move-result-object p2
- :goto_0
- invoke-virtual {p0, p2, v2}, Lcom/google/gson/internal/LinkedTreeMap;->removeInternal(Lcom/google/gson/internal/LinkedTreeMap$Node;Z)V
- iget-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
- if-eqz v0, :cond_2
- iget v1, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- iput-object v0, p2, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iput-object p2, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iput-object v3, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
- goto :goto_1
- :cond_2
- const/4 v1, 0x0
- :goto_1
- iget-object v0, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
- if-eqz v0, :cond_3
- iget v2, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- iput-object v0, p2, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iput-object p2, v0, Lcom/google/gson/internal/LinkedTreeMap$Node;->parent:Lcom/google/gson/internal/LinkedTreeMap$Node;
- iput-object v3, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
- :cond_3
- invoke-static {v1, v2}, Ljava/lang/Math;->max(II)I
- move-result v0
- add-int/lit8 v0, v0, 0x1
- iput v0, p2, Lcom/google/gson/internal/LinkedTreeMap$Node;->height:I
- invoke-direct {p0, p1, p2}, Lcom/google/gson/internal/LinkedTreeMap;->replaceInParent(Lcom/google/gson/internal/LinkedTreeMap$Node;Lcom/google/gson/internal/LinkedTreeMap$Node;)V
- return-void
- :cond_4
- if-eqz p2, :cond_5
- invoke-direct {p0, p1, p2}, Lcom/google/gson/internal/LinkedTreeMap;->replaceInParent(Lcom/google/gson/internal/LinkedTreeMap$Node;Lcom/google/gson/internal/LinkedTreeMap$Node;)V
- iput-object v3, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->left:Lcom/google/gson/internal/LinkedTreeMap$Node;
- goto :goto_2
- :cond_5
- if-eqz v0, :cond_6
- invoke-direct {p0, p1, v0}, Lcom/google/gson/internal/LinkedTreeMap;->replaceInParent(Lcom/google/gson/internal/LinkedTreeMap$Node;Lcom/google/gson/internal/LinkedTreeMap$Node;)V
- iput-object v3, p1, Lcom/google/gson/internal/LinkedTreeMap$Node;->right:Lcom/google/gson/internal/LinkedTreeMap$Node;
- goto :goto_2
- :cond_6
- invoke-direct {p0, p1, v3}, Lcom/google/gson/internal/LinkedTreeMap;->replaceInParent(Lcom/google/gson/internal/LinkedTreeMap$Node;Lcom/google/gson/internal/LinkedTreeMap$Node;)V
- :goto_2
- invoke-direct {p0, v1, v2}, Lcom/google/gson/internal/LinkedTreeMap;->rebalance(Lcom/google/gson/internal/LinkedTreeMap$Node;Z)V
- iget p1, p0, Lcom/google/gson/internal/LinkedTreeMap;->size:I
- add-int/lit8 p1, p1, -0x1
- iput p1, p0, Lcom/google/gson/internal/LinkedTreeMap;->size:I
- iget p1, p0, Lcom/google/gson/internal/LinkedTreeMap;->modCount:I
- add-int/lit8 p1, p1, 0x1
- iput p1, p0, Lcom/google/gson/internal/LinkedTreeMap;->modCount:I
- return-void
- .end method
- .method removeInternalByKey(Ljava/lang/Object;)Lcom/google/gson/internal/LinkedTreeMap$Node;
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Ljava/lang/Object;",
- ")",
- "Lcom/google/gson/internal/LinkedTreeMap$Node<",
- "TK;TV;>;"
- }
- .end annotation
- invoke-virtual {p0, p1}, Lcom/google/gson/internal/LinkedTreeMap;->findByObject(Ljava/lang/Object;)Lcom/google/gson/internal/LinkedTreeMap$Node;
- move-result-object p1
- if-eqz p1, :cond_0
- const/4 v0, 0x1
- invoke-virtual {p0, p1, v0}, Lcom/google/gson/internal/LinkedTreeMap;->removeInternal(Lcom/google/gson/internal/LinkedTreeMap$Node;Z)V
- :cond_0
- return-object p1
- .end method
- .method public size()I
- .locals 1
- iget v0, p0, Lcom/google/gson/internal/LinkedTreeMap;->size:I
- return v0
- .end method
|