.class public final Lcom/google/common/collect/MapMaker; .super Ljava/lang/Object; .source "MapMaker.java" # annotations .annotation runtime Lcom/google/common/collect/ElementTypesAreNonnullByDefault; .end annotation .annotation system Ldalvik/annotation/MemberClasses; value = { Lcom/google/common/collect/MapMaker$Dummy; } .end annotation # static fields .field private static final DEFAULT_CONCURRENCY_LEVEL:I = 0x4 .field private static final DEFAULT_INITIAL_CAPACITY:I = 0x10 .field static final UNSET_INT:I = -0x1 # instance fields .field concurrencyLevel:I .field initialCapacity:I .field keyEquivalence:Lcom/google/common/base/Equivalence; .annotation system Ldalvik/annotation/Signature; value = { "Lcom/google/common/base/Equivalence<", "Ljava/lang/Object;", ">;" } .end annotation .annotation runtime Ljavax/annotation/CheckForNull; .end annotation .end field .field keyStrength:Lcom/google/common/collect/MapMakerInternalMap$Strength; .annotation runtime Ljavax/annotation/CheckForNull; .end annotation .end field .field useCustomMap:Z .field valueStrength:Lcom/google/common/collect/MapMakerInternalMap$Strength; .annotation runtime Ljavax/annotation/CheckForNull; .end annotation .end field # direct methods .method public constructor ()V .locals 1 .line 111 invoke-direct {p0}, Ljava/lang/Object;->()V const/4 v0, -0x1 iput v0, p0, Lcom/google/common/collect/MapMaker;->initialCapacity:I iput v0, p0, Lcom/google/common/collect/MapMaker;->concurrencyLevel:I return-void .end method # virtual methods .method public concurrencyLevel(I)Lcom/google/common/collect/MapMaker; .locals 5 iget v0, p0, Lcom/google/common/collect/MapMaker;->concurrencyLevel:I const/4 v1, -0x1 const/4 v2, 0x1 const/4 v3, 0x0 if-ne v0, v1, :cond_0 move v1, v2 goto :goto_0 :cond_0 move v1, v3 :goto_0 const-string v4, "concurrency level was already set to %s" .line 179 invoke-static {v1, v4, v0}, Lcom/google/common/base/Preconditions;->checkState(ZLjava/lang/String;I)V if-lez p1, :cond_1 goto :goto_1 :cond_1 move v2, v3 .line 183 :goto_1 invoke-static {v2}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V iput p1, p0, Lcom/google/common/collect/MapMaker;->concurrencyLevel:I return-object p0 .end method .method getConcurrencyLevel()I .locals 1 iget p0, p0, Lcom/google/common/collect/MapMaker;->concurrencyLevel:I const/4 v0, -0x1 if-ne p0, v0, :cond_0 const/4 p0, 0x4 :cond_0 return p0 .end method .method getInitialCapacity()I .locals 1 iget p0, p0, Lcom/google/common/collect/MapMaker;->initialCapacity:I const/4 v0, -0x1 if-ne p0, v0, :cond_0 const/16 p0, 0x10 :cond_0 return p0 .end method .method getKeyEquivalence()Lcom/google/common/base/Equivalence; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lcom/google/common/base/Equivalence<", "Ljava/lang/Object;", ">;" } .end annotation iget-object v0, p0, Lcom/google/common/collect/MapMaker;->keyEquivalence:Lcom/google/common/base/Equivalence; .line 130 invoke-virtual {p0}, Lcom/google/common/collect/MapMaker;->getKeyStrength()Lcom/google/common/collect/MapMakerInternalMap$Strength; move-result-object p0 invoke-virtual {p0}, Lcom/google/common/collect/MapMakerInternalMap$Strength;->defaultEquivalence()Lcom/google/common/base/Equivalence; move-result-object p0 invoke-static {v0, p0}, Lcom/google/common/base/MoreObjects;->firstNonNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; move-result-object p0 check-cast p0, Lcom/google/common/base/Equivalence; return-object p0 .end method .method getKeyStrength()Lcom/google/common/collect/MapMakerInternalMap$Strength; .locals 1 iget-object p0, p0, Lcom/google/common/collect/MapMaker;->keyStrength:Lcom/google/common/collect/MapMakerInternalMap$Strength; .line 220 sget-object v0, Lcom/google/common/collect/MapMakerInternalMap$Strength;->STRONG:Lcom/google/common/collect/MapMakerInternalMap$Strength; invoke-static {p0, v0}, Lcom/google/common/base/MoreObjects;->firstNonNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; move-result-object p0 check-cast p0, Lcom/google/common/collect/MapMakerInternalMap$Strength; return-object p0 .end method .method getValueStrength()Lcom/google/common/collect/MapMakerInternalMap$Strength; .locals 1 iget-object p0, p0, Lcom/google/common/collect/MapMaker;->valueStrength:Lcom/google/common/collect/MapMakerInternalMap$Strength; .line 266 sget-object v0, Lcom/google/common/collect/MapMakerInternalMap$Strength;->STRONG:Lcom/google/common/collect/MapMakerInternalMap$Strength; invoke-static {p0, v0}, Lcom/google/common/base/MoreObjects;->firstNonNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; move-result-object p0 check-cast p0, Lcom/google/common/collect/MapMakerInternalMap$Strength; return-object p0 .end method .method public initialCapacity(I)Lcom/google/common/collect/MapMaker; .locals 5 iget v0, p0, Lcom/google/common/collect/MapMaker;->initialCapacity:I const/4 v1, -0x1 const/4 v2, 0x1 const/4 v3, 0x0 if-ne v0, v1, :cond_0 move v1, v2 goto :goto_0 :cond_0 move v1, v3 :goto_0 const-string v4, "initial capacity was already set to %s" .line 145 invoke-static {v1, v4, v0}, Lcom/google/common/base/Preconditions;->checkState(ZLjava/lang/String;I)V if-ltz p1, :cond_1 goto :goto_1 :cond_1 move v2, v3 .line 149 :goto_1 invoke-static {v2}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V iput p1, p0, Lcom/google/common/collect/MapMaker;->initialCapacity:I return-object p0 .end method .method keyEquivalence(Lcom/google/common/base/Equivalence;)Lcom/google/common/collect/MapMaker; .locals 4 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lcom/google/common/base/Equivalence<", "Ljava/lang/Object;", ">;)", "Lcom/google/common/collect/MapMaker;" } .end annotation iget-object v0, p0, Lcom/google/common/collect/MapMaker;->keyEquivalence:Lcom/google/common/base/Equivalence; const/4 v1, 0x1 if-nez v0, :cond_0 move v2, v1 goto :goto_0 :cond_0 const/4 v2, 0x0 :goto_0 const-string v3, "key equivalence was already set to %s" .line 123 invoke-static {v2, v3, v0}, Lcom/google/common/base/Preconditions;->checkState(ZLjava/lang/String;Ljava/lang/Object;)V .line 124 invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p1 check-cast p1, Lcom/google/common/base/Equivalence; iput-object p1, p0, Lcom/google/common/collect/MapMaker;->keyEquivalence:Lcom/google/common/base/Equivalence; iput-boolean v1, p0, Lcom/google/common/collect/MapMaker;->useCustomMap:Z return-object p0 .end method .method public makeMap()Ljava/util/concurrent/ConcurrentMap; .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/concurrent/ConcurrentMap<", "TK;TV;>;" } .end annotation iget-boolean v0, p0, Lcom/google/common/collect/MapMaker;->useCustomMap:Z if-nez v0, :cond_0 .line 282 new-instance v0, Ljava/util/concurrent/ConcurrentHashMap; invoke-virtual {p0}, Lcom/google/common/collect/MapMaker;->getInitialCapacity()I move-result v1 const/high16 v2, 0x3f400000 # 0.75f invoke-virtual {p0}, Lcom/google/common/collect/MapMaker;->getConcurrencyLevel()I move-result p0 invoke-direct {v0, v1, v2, p0}, Ljava/util/concurrent/ConcurrentHashMap;->(IFI)V return-object v0 .line 284 :cond_0 invoke-static {p0}, Lcom/google/common/collect/MapMakerInternalMap;->create(Lcom/google/common/collect/MapMaker;)Lcom/google/common/collect/MapMakerInternalMap; move-result-object p0 return-object p0 .end method .method setKeyStrength(Lcom/google/common/collect/MapMakerInternalMap$Strength;)Lcom/google/common/collect/MapMaker; .locals 4 iget-object v0, p0, Lcom/google/common/collect/MapMaker;->keyStrength:Lcom/google/common/collect/MapMakerInternalMap$Strength; const/4 v1, 0x1 if-nez v0, :cond_0 move v2, v1 goto :goto_0 :cond_0 const/4 v2, 0x0 :goto_0 const-string v3, "Key strength was already set to %s" .line 210 invoke-static {v2, v3, v0}, Lcom/google/common/base/Preconditions;->checkState(ZLjava/lang/String;Ljava/lang/Object;)V .line 211 invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/google/common/collect/MapMakerInternalMap$Strength; iput-object v0, p0, Lcom/google/common/collect/MapMaker;->keyStrength:Lcom/google/common/collect/MapMakerInternalMap$Strength; .line 212 sget-object v0, Lcom/google/common/collect/MapMakerInternalMap$Strength;->STRONG:Lcom/google/common/collect/MapMakerInternalMap$Strength; if-eq p1, v0, :cond_1 iput-boolean v1, p0, Lcom/google/common/collect/MapMaker;->useCustomMap:Z :cond_1 return-object p0 .end method .method setValueStrength(Lcom/google/common/collect/MapMakerInternalMap$Strength;)Lcom/google/common/collect/MapMaker; .locals 4 iget-object v0, p0, Lcom/google/common/collect/MapMaker;->valueStrength:Lcom/google/common/collect/MapMakerInternalMap$Strength; const/4 v1, 0x1 if-nez v0, :cond_0 move v2, v1 goto :goto_0 :cond_0 const/4 v2, 0x0 :goto_0 const-string v3, "Value strength was already set to %s" .line 256 invoke-static {v2, v3, v0}, Lcom/google/common/base/Preconditions;->checkState(ZLjava/lang/String;Ljava/lang/Object;)V .line 257 invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/google/common/collect/MapMakerInternalMap$Strength; iput-object v0, p0, Lcom/google/common/collect/MapMaker;->valueStrength:Lcom/google/common/collect/MapMakerInternalMap$Strength; .line 258 sget-object v0, Lcom/google/common/collect/MapMakerInternalMap$Strength;->STRONG:Lcom/google/common/collect/MapMakerInternalMap$Strength; if-eq p1, v0, :cond_1 iput-boolean v1, p0, Lcom/google/common/collect/MapMaker;->useCustomMap:Z :cond_1 return-object p0 .end method .method public toString()Ljava/lang/String; .locals 4 .line 293 invoke-static {p0}, Lcom/google/common/base/MoreObjects;->toStringHelper(Ljava/lang/Object;)Lcom/google/common/base/MoreObjects$ToStringHelper; move-result-object v0 iget v1, p0, Lcom/google/common/collect/MapMaker;->initialCapacity:I const/4 v2, -0x1 if-eq v1, v2, :cond_0 const-string v3, "initialCapacity" .line 295 invoke-virtual {v0, v3, v1}, Lcom/google/common/base/MoreObjects$ToStringHelper;->add(Ljava/lang/String;I)Lcom/google/common/base/MoreObjects$ToStringHelper; :cond_0 iget v1, p0, Lcom/google/common/collect/MapMaker;->concurrencyLevel:I if-eq v1, v2, :cond_1 const-string v2, "concurrencyLevel" .line 298 invoke-virtual {v0, v2, v1}, Lcom/google/common/base/MoreObjects$ToStringHelper;->add(Ljava/lang/String;I)Lcom/google/common/base/MoreObjects$ToStringHelper; :cond_1 iget-object v1, p0, Lcom/google/common/collect/MapMaker;->keyStrength:Lcom/google/common/collect/MapMakerInternalMap$Strength; if-eqz v1, :cond_2 .line 301 invoke-virtual {v1}, Lcom/google/common/collect/MapMakerInternalMap$Strength;->toString()Ljava/lang/String; move-result-object v1 invoke-static {v1}, Lcom/google/common/base/Ascii;->toLowerCase(Ljava/lang/String;)Ljava/lang/String; move-result-object v1 const-string v2, "keyStrength" invoke-virtual {v0, v2, v1}, Lcom/google/common/base/MoreObjects$ToStringHelper;->add(Ljava/lang/String;Ljava/lang/Object;)Lcom/google/common/base/MoreObjects$ToStringHelper; :cond_2 iget-object v1, p0, Lcom/google/common/collect/MapMaker;->valueStrength:Lcom/google/common/collect/MapMakerInternalMap$Strength; if-eqz v1, :cond_3 .line 304 invoke-virtual {v1}, Lcom/google/common/collect/MapMakerInternalMap$Strength;->toString()Ljava/lang/String; move-result-object v1 invoke-static {v1}, Lcom/google/common/base/Ascii;->toLowerCase(Ljava/lang/String;)Ljava/lang/String; move-result-object v1 const-string v2, "valueStrength" invoke-virtual {v0, v2, v1}, Lcom/google/common/base/MoreObjects$ToStringHelper;->add(Ljava/lang/String;Ljava/lang/Object;)Lcom/google/common/base/MoreObjects$ToStringHelper; :cond_3 iget-object p0, p0, Lcom/google/common/collect/MapMaker;->keyEquivalence:Lcom/google/common/base/Equivalence; if-eqz p0, :cond_4 const-string p0, "keyEquivalence" .line 307 invoke-virtual {v0, p0}, Lcom/google/common/base/MoreObjects$ToStringHelper;->addValue(Ljava/lang/Object;)Lcom/google/common/base/MoreObjects$ToStringHelper; .line 309 :cond_4 invoke-virtual {v0}, Lcom/google/common/base/MoreObjects$ToStringHelper;->toString()Ljava/lang/String; move-result-object p0 return-object p0 .end method .method public weakKeys()Lcom/google/common/collect/MapMaker; .locals 1 .line 206 sget-object v0, Lcom/google/common/collect/MapMakerInternalMap$Strength;->WEAK:Lcom/google/common/collect/MapMakerInternalMap$Strength; invoke-virtual {p0, v0}, Lcom/google/common/collect/MapMaker;->setKeyStrength(Lcom/google/common/collect/MapMakerInternalMap$Strength;)Lcom/google/common/collect/MapMaker; move-result-object p0 return-object p0 .end method .method public weakValues()Lcom/google/common/collect/MapMaker; .locals 1 .line 242 sget-object v0, Lcom/google/common/collect/MapMakerInternalMap$Strength;->WEAK:Lcom/google/common/collect/MapMakerInternalMap$Strength; invoke-virtual {p0, v0}, Lcom/google/common/collect/MapMaker;->setValueStrength(Lcom/google/common/collect/MapMakerInternalMap$Strength;)Lcom/google/common/collect/MapMaker; move-result-object p0 return-object p0 .end method