.class public final Lcom/google/common/collect/ConcurrentHashMultiset; .super Lcom/google/common/collect/AbstractMultiset; .source "ConcurrentHashMultiset.java" # interfaces .implements Ljava/io/Serializable; # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Lcom/google/common/collect/ConcurrentHashMultiset$EntrySet;, Lcom/google/common/collect/ConcurrentHashMultiset$FieldSettersHolder; } .end annotation .annotation system Ldalvik/annotation/Signature; value = { "", "Lcom/google/common/collect/AbstractMultiset", ";", "Ljava/io/Serializable;" } .end annotation # static fields .field private static final serialVersionUID:J = 0x1L # instance fields .field private final transient countMap:Ljava/util/concurrent/ConcurrentMap; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/concurrent/ConcurrentMap", ";" } .end annotation .end field .field private transient entrySet:Lcom/google/common/collect/ConcurrentHashMultiset$EntrySet; .annotation system Ldalvik/annotation/Signature; value = { "Lcom/google/common/collect/ConcurrentHashMultiset", ".EntrySet;" } .end annotation .end field # direct methods .method constructor (Ljava/util/concurrent/ConcurrentMap;)V .locals 1 .annotation build Lcom/google/common/annotations/VisibleForTesting; .end annotation .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/concurrent/ConcurrentMap", ";)V" } .end annotation .prologue .line 140 invoke-direct {p0}, Lcom/google/common/collect/AbstractMultiset;->()V .line 141 invoke-interface {p1}, Ljava/util/concurrent/ConcurrentMap;->isEmpty()Z move-result v0 invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V .line 142 iput-object p1, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; .line 143 return-void .end method .method static synthetic access$100(Lcom/google/common/collect/ConcurrentHashMultiset;)Ljava/util/concurrent/ConcurrentMap; .locals 1 .prologue .line 57 iget-object v0, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; return-object v0 .end method .method public static create()Lcom/google/common/collect/ConcurrentHashMultiset; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lcom/google/common/collect/ConcurrentHashMultiset", ";" } .end annotation .prologue .line 87 new-instance v0, Lcom/google/common/collect/ConcurrentHashMultiset; new-instance v1, Ljava/util/concurrent/ConcurrentHashMap; invoke-direct {v1}, Ljava/util/concurrent/ConcurrentHashMap;->()V invoke-direct {v0, v1}, Lcom/google/common/collect/ConcurrentHashMultiset;->(Ljava/util/concurrent/ConcurrentMap;)V return-object v0 .end method .method public static create(Lcom/google/common/collect/MapMaker;)Lcom/google/common/collect/ConcurrentHashMultiset; .locals 2 .annotation build Lcom/google/common/annotations/Beta; .end annotation .annotation system Ldalvik/annotation/Signature; value = { "(", "Lcom/google/common/collect/MapMaker;", ")", "Lcom/google/common/collect/ConcurrentHashMultiset", ";" } .end annotation .prologue .line 127 new-instance v0, Lcom/google/common/collect/ConcurrentHashMultiset; invoke-virtual {p0}, Lcom/google/common/collect/MapMaker;->makeMap()Ljava/util/concurrent/ConcurrentMap; move-result-object v1 invoke-direct {v0, v1}, Lcom/google/common/collect/ConcurrentHashMultiset;->(Ljava/util/concurrent/ConcurrentMap;)V return-object v0 .end method .method public static create(Ljava/lang/Iterable;)Lcom/google/common/collect/ConcurrentHashMultiset; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/Iterable", "<+TE;>;)", "Lcom/google/common/collect/ConcurrentHashMultiset", ";" } .end annotation .prologue .line 99 invoke-static {}, Lcom/google/common/collect/ConcurrentHashMultiset;->create()Lcom/google/common/collect/ConcurrentHashMultiset; move-result-object v0 .line 100 invoke-static {v0, p0}, Lcom/google/common/collect/Iterables;->addAll(Ljava/util/Collection;Ljava/lang/Iterable;)Z .line 101 return-object v0 .end method .method private readObject(Ljava/io/ObjectInputStream;)V .locals 2 .prologue .line 573 invoke-virtual {p1}, Ljava/io/ObjectInputStream;->defaultReadObject()V .line 575 invoke-virtual {p1}, Ljava/io/ObjectInputStream;->readObject()Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/util/concurrent/ConcurrentMap; .line 577 sget-object v1, Lcom/google/common/collect/ConcurrentHashMultiset$FieldSettersHolder;->COUNT_MAP_FIELD_SETTER:Lcom/google/common/collect/Serialization$FieldSetter; invoke-virtual {v1, p0, v0}, Lcom/google/common/collect/Serialization$FieldSetter;->set(Ljava/lang/Object;Ljava/lang/Object;)V .line 578 return-void .end method .method private snapshot()Ljava/util/List; .locals 4 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/List", ";" } .end annotation .prologue .line 190 invoke-virtual {p0}, Lcom/google/common/collect/ConcurrentHashMultiset;->size()I move-result v0 invoke-static {v0}, Lcom/google/common/collect/Lists;->newArrayListWithExpectedSize(I)Ljava/util/ArrayList; move-result-object v1 .line 191 invoke-virtual {p0}, Lcom/google/common/collect/ConcurrentHashMultiset;->entrySet()Ljava/util/Set; move-result-object v0 invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator; move-result-object v2 :cond_0 invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_1 invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/google/common/collect/Multiset$Entry; .line 192 invoke-interface {v0}, Lcom/google/common/collect/Multiset$Entry;->getElement()Ljava/lang/Object; move-result-object v3 .line 193 invoke-interface {v0}, Lcom/google/common/collect/Multiset$Entry;->getCount()I move-result v0 :goto_0 if-lez v0, :cond_0 .line 194 invoke-interface {v1, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z .line 193 add-int/lit8 v0, v0, -0x1 goto :goto_0 .line 197 :cond_1 return-object v1 .end method .method private writeObject(Ljava/io/ObjectOutputStream;)V .locals 1 .prologue .line 568 invoke-virtual {p1}, Ljava/io/ObjectOutputStream;->defaultWriteObject()V .line 569 iget-object v0, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-virtual {p1, v0}, Ljava/io/ObjectOutputStream;->writeObject(Ljava/lang/Object;)V .line 570 return-void .end method # virtual methods .method public add(Ljava/lang/Object;I)I .locals 5 .annotation system Ldalvik/annotation/Signature; value = { "(TE;I)I" } .end annotation .prologue const/4 v1, 0x1 const/4 v2, 0x0 .line 212 invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; .line 213 if-nez p2, :cond_1 .line 214 invoke-virtual {p0, p1}, Lcom/google/common/collect/ConcurrentHashMultiset;->count(Ljava/lang/Object;)I move-result v2 .line 248 :cond_0 :goto_0 return v2 .line 216 :cond_1 if-lez p2, :cond_4 move v0, v1 :goto_1 const-string v3, "Invalid occurrences: %s" new-array v1, v1, [Ljava/lang/Object; invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object v4 aput-object v4, v1, v2 invoke-static {v0, v3, v1}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;[Ljava/lang/Object;)V .line 219 :cond_2 iget-object v0, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-static {v0, p1}, Lcom/google/common/collect/Maps;->safeGet(Ljava/util/Map;Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/util/concurrent/atomic/AtomicInteger; .line 220 if-nez v0, :cond_3 .line 221 iget-object v0, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; new-instance v1, Ljava/util/concurrent/atomic/AtomicInteger; invoke-direct {v1, p2}, Ljava/util/concurrent/atomic/AtomicInteger;->(I)V invoke-interface {v0, p1, v1}, Ljava/util/concurrent/ConcurrentMap;->putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/util/concurrent/atomic/AtomicInteger; .line 222 if-eqz v0, :cond_0 .line 229 :cond_3 invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I move-result v1 .line 230 if-eqz v1, :cond_5 .line 232 :try_start_0 invoke-static {v1, p2}, Lcom/google/common/math/IntMath;->checkedAdd(II)I move-result v3 .line 233 invoke-virtual {v0, v1, v3}, Ljava/util/concurrent/atomic/AtomicInteger;->compareAndSet(II)Z :try_end_0 .catch Ljava/lang/ArithmeticException; {:try_start_0 .. :try_end_0} :catch_0 move-result v3 if-eqz v3, :cond_3 move v2, v1 .line 235 goto :goto_0 :cond_4 move v0, v2 .line 216 goto :goto_1 .line 237 :catch_0 move-exception v0 .line 238 new-instance v0, Ljava/lang/IllegalArgumentException; new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2}, Ljava/lang/StringBuilder;->()V const-string v3, "Overflow adding " invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v2, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v2 const-string v3, " occurrences to a count of " invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v1 invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V throw v0 .line 245 :cond_5 new-instance v1, Ljava/util/concurrent/atomic/AtomicInteger; invoke-direct {v1, p2}, Ljava/util/concurrent/atomic/AtomicInteger;->(I)V .line 246 iget-object v3, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-interface {v3, p1, v1}, Ljava/util/concurrent/ConcurrentMap;->putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; move-result-object v3 if-eqz v3, :cond_0 iget-object v3, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-interface {v3, p1, v0, v1}, Ljava/util/concurrent/ConcurrentMap;->replace(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z move-result v0 if-eqz v0, :cond_2 goto :goto_0 .end method .method public bridge synthetic add(Ljava/lang/Object;)Z .locals 1 .prologue .line 57 invoke-super {p0, p1}, Lcom/google/common/collect/AbstractMultiset;->add(Ljava/lang/Object;)Z move-result v0 return v0 .end method .method public bridge synthetic addAll(Ljava/util/Collection;)Z .locals 1 .prologue .line 57 invoke-super {p0, p1}, Lcom/google/common/collect/AbstractMultiset;->addAll(Ljava/util/Collection;)Z move-result v0 return v0 .end method .method public clear()V .locals 1 .prologue .line 535 iget-object v0, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-interface {v0}, Ljava/util/concurrent/ConcurrentMap;->clear()V .line 536 return-void .end method .method public bridge synthetic contains(Ljava/lang/Object;)Z .locals 1 .prologue .line 57 invoke-super {p0, p1}, Lcom/google/common/collect/AbstractMultiset;->contains(Ljava/lang/Object;)Z move-result v0 return v0 .end method .method public count(Ljava/lang/Object;)I .locals 1 .param p1 # Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .prologue .line 154 iget-object v0, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-static {v0, p1}, Lcom/google/common/collect/Maps;->safeGet(Ljava/util/Map;Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/util/concurrent/atomic/AtomicInteger; .line 155 if-nez v0, :cond_0 const/4 v0, 0x0 :goto_0 return v0 :cond_0 invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I move-result v0 goto :goto_0 .end method .method createElementSet()Ljava/util/Set; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/Set", ";" } .end annotation .prologue .line 449 iget-object v0, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-interface {v0}, Ljava/util/concurrent/ConcurrentMap;->keySet()Ljava/util/Set; move-result-object v0 .line 450 new-instance v1, Lcom/google/common/collect/ConcurrentHashMultiset$1; invoke-direct {v1, p0, v0}, Lcom/google/common/collect/ConcurrentHashMultiset$1;->(Lcom/google/common/collect/ConcurrentHashMultiset;Ljava/util/Set;)V return-object v1 .end method .method distinctElements()I .locals 1 .prologue .line 486 iget-object v0, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-interface {v0}, Ljava/util/concurrent/ConcurrentMap;->size()I move-result v0 return v0 .end method .method public bridge synthetic elementSet()Ljava/util/Set; .locals 1 .prologue .line 57 invoke-super {p0}, Lcom/google/common/collect/AbstractMultiset;->elementSet()Ljava/util/Set; move-result-object v0 return-object v0 .end method .method entryIterator()Ljava/util/Iterator; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/Iterator", "<", "Lcom/google/common/collect/Multiset$Entry", ";>;" } .end annotation .prologue .line 496 new-instance v0, Lcom/google/common/collect/ConcurrentHashMultiset$2; invoke-direct {v0, p0}, Lcom/google/common/collect/ConcurrentHashMultiset$2;->(Lcom/google/common/collect/ConcurrentHashMultiset;)V .line 514 new-instance v1, Lcom/google/common/collect/ConcurrentHashMultiset$3; invoke-direct {v1, p0, v0}, Lcom/google/common/collect/ConcurrentHashMultiset$3;->(Lcom/google/common/collect/ConcurrentHashMultiset;Ljava/util/Iterator;)V return-object v1 .end method .method public entrySet()Ljava/util/Set; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/Set", "<", "Lcom/google/common/collect/Multiset$Entry", ";>;" } .end annotation .prologue .line 478 iget-object v0, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->entrySet:Lcom/google/common/collect/ConcurrentHashMultiset$EntrySet; .line 479 if-nez v0, :cond_0 .line 480 new-instance v0, Lcom/google/common/collect/ConcurrentHashMultiset$EntrySet; const/4 v1, 0x0 invoke-direct {v0, p0, v1}, Lcom/google/common/collect/ConcurrentHashMultiset$EntrySet;->(Lcom/google/common/collect/ConcurrentHashMultiset;Lcom/google/common/collect/ConcurrentHashMultiset$1;)V iput-object v0, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->entrySet:Lcom/google/common/collect/ConcurrentHashMultiset$EntrySet; .line 482 :cond_0 return-object v0 .end method .method public bridge synthetic equals(Ljava/lang/Object;)Z .locals 1 .prologue .line 57 invoke-super {p0, p1}, Lcom/google/common/collect/AbstractMultiset;->equals(Ljava/lang/Object;)Z move-result v0 return v0 .end method .method public bridge synthetic hashCode()I .locals 1 .prologue .line 57 invoke-super {p0}, Lcom/google/common/collect/AbstractMultiset;->hashCode()I move-result v0 return v0 .end method .method public isEmpty()Z .locals 1 .prologue .line 490 iget-object v0, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-interface {v0}, Ljava/util/concurrent/ConcurrentMap;->isEmpty()Z move-result v0 return v0 .end method .method public bridge synthetic iterator()Ljava/util/Iterator; .locals 1 .prologue .line 57 invoke-super {p0}, Lcom/google/common/collect/AbstractMultiset;->iterator()Ljava/util/Iterator; move-result-object v0 return-object v0 .end method .method public remove(Ljava/lang/Object;I)I .locals 5 .param p1 # Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .prologue const/4 v1, 0x1 const/4 v2, 0x0 .line 277 if-nez p2, :cond_1 .line 278 invoke-virtual {p0, p1}, Lcom/google/common/collect/ConcurrentHashMultiset;->count(Ljava/lang/Object;)I move-result v2 .line 299 :cond_0 :goto_0 return v2 .line 280 :cond_1 if-lez p2, :cond_4 move v0, v1 :goto_1 const-string v3, "Invalid occurrences: %s" new-array v1, v1, [Ljava/lang/Object; invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object v4 aput-object v4, v1, v2 invoke-static {v0, v3, v1}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;[Ljava/lang/Object;)V .line 282 iget-object v0, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-static {v0, p1}, Lcom/google/common/collect/Maps;->safeGet(Ljava/util/Map;Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/util/concurrent/atomic/AtomicInteger; .line 283 if-eqz v0, :cond_0 .line 287 :cond_2 invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I move-result v1 .line 288 if-eqz v1, :cond_0 .line 289 sub-int v3, v1, p2 invoke-static {v2, v3}, Ljava/lang/Math;->max(II)I move-result v3 .line 290 invoke-virtual {v0, v1, v3}, Ljava/util/concurrent/atomic/AtomicInteger;->compareAndSet(II)Z move-result v4 if-eqz v4, :cond_2 .line 291 if-nez v3, :cond_3 .line 294 iget-object v2, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-interface {v2, p1, v0}, Ljava/util/concurrent/ConcurrentMap;->remove(Ljava/lang/Object;Ljava/lang/Object;)Z :cond_3 move v2, v1 .line 296 goto :goto_0 :cond_4 move v0, v2 .line 280 goto :goto_1 .end method .method public bridge synthetic remove(Ljava/lang/Object;)Z .locals 1 .prologue .line 57 invoke-super {p0, p1}, Lcom/google/common/collect/AbstractMultiset;->remove(Ljava/lang/Object;)Z move-result v0 return v0 .end method .method public bridge synthetic removeAll(Ljava/util/Collection;)Z .locals 1 .prologue .line 57 invoke-super {p0, p1}, Lcom/google/common/collect/AbstractMultiset;->removeAll(Ljava/util/Collection;)Z move-result v0 return v0 .end method .method public removeExactly(Ljava/lang/Object;I)Z .locals 6 .param p1 # Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .prologue const/4 v1, 0x1 const/4 v2, 0x0 .line 316 if-nez p2, :cond_1 .line 337 :cond_0 :goto_0 return v1 .line 319 :cond_1 if-lez p2, :cond_2 move v0, v1 :goto_1 const-string v3, "Invalid occurrences: %s" new-array v4, v1, [Ljava/lang/Object; invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object v5 aput-object v5, v4, v2 invoke-static {v0, v3, v4}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;[Ljava/lang/Object;)V .line 321 iget-object v0, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-static {v0, p1}, Lcom/google/common/collect/Maps;->safeGet(Ljava/util/Map;Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/util/concurrent/atomic/AtomicInteger; .line 322 if-nez v0, :cond_3 move v1, v2 .line 323 goto :goto_0 :cond_2 move v0, v2 .line 319 goto :goto_1 .line 326 :cond_3 invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I move-result v3 .line 327 if-ge v3, p2, :cond_4 move v1, v2 .line 328 goto :goto_0 .line 330 :cond_4 sub-int v4, v3, p2 .line 331 invoke-virtual {v0, v3, v4}, Ljava/util/concurrent/atomic/AtomicInteger;->compareAndSet(II)Z move-result v3 if-eqz v3, :cond_3 .line 332 if-nez v4, :cond_0 .line 335 iget-object v2, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-interface {v2, p1, v0}, Ljava/util/concurrent/ConcurrentMap;->remove(Ljava/lang/Object;Ljava/lang/Object;)Z goto :goto_0 .end method .method public bridge synthetic retainAll(Ljava/util/Collection;)Z .locals 1 .prologue .line 57 invoke-super {p0, p1}, Lcom/google/common/collect/AbstractMultiset;->retainAll(Ljava/util/Collection;)Z move-result v0 return v0 .end method .method public setCount(Ljava/lang/Object;I)I .locals 4 .annotation system Ldalvik/annotation/Signature; value = { "(TE;I)I" } .end annotation .prologue const/4 v1, 0x0 .line 350 invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; .line 351 const-string v0, "count" invoke-static {p2, v0}, Lcom/google/common/collect/CollectPreconditions;->checkNonnegative(ILjava/lang/String;)I .line 353 :cond_0 iget-object v0, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-static {v0, p1}, Lcom/google/common/collect/Maps;->safeGet(Ljava/util/Map;Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/util/concurrent/atomic/AtomicInteger; .line 354 if-nez v0, :cond_2 .line 355 if-nez p2, :cond_1 move v0, v1 .line 386 :goto_0 return v0 .line 358 :cond_1 iget-object v0, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; new-instance v2, Ljava/util/concurrent/atomic/AtomicInteger; invoke-direct {v2, p2}, Ljava/util/concurrent/atomic/AtomicInteger;->(I)V invoke-interface {v0, p1, v2}, Ljava/util/concurrent/ConcurrentMap;->putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/util/concurrent/atomic/AtomicInteger; .line 359 if-nez v0, :cond_2 move v0, v1 .line 360 goto :goto_0 .line 367 :cond_2 invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I move-result v2 .line 368 if-nez v2, :cond_5 .line 369 if-nez p2, :cond_3 move v0, v1 .line 370 goto :goto_0 .line 372 :cond_3 new-instance v2, Ljava/util/concurrent/atomic/AtomicInteger; invoke-direct {v2, p2}, Ljava/util/concurrent/atomic/AtomicInteger;->(I)V .line 373 iget-object v3, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-interface {v3, p1, v2}, Ljava/util/concurrent/ConcurrentMap;->putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; move-result-object v3 if-eqz v3, :cond_4 iget-object v3, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-interface {v3, p1, v0, v2}, Ljava/util/concurrent/ConcurrentMap;->replace(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z move-result v0 if-eqz v0, :cond_0 :cond_4 move v0, v1 .line 375 goto :goto_0 .line 380 :cond_5 invoke-virtual {v0, v2, p2}, Ljava/util/concurrent/atomic/AtomicInteger;->compareAndSet(II)Z move-result v3 if-eqz v3, :cond_2 .line 381 if-nez p2, :cond_6 .line 384 iget-object v1, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-interface {v1, p1, v0}, Ljava/util/concurrent/ConcurrentMap;->remove(Ljava/lang/Object;Ljava/lang/Object;)Z :cond_6 move v0, v2 .line 386 goto :goto_0 .end method .method public setCount(Ljava/lang/Object;II)Z .locals 5 .annotation system Ldalvik/annotation/Signature; value = { "(TE;II)Z" } .end annotation .prologue const/4 v2, 0x0 const/4 v1, 0x1 .line 405 invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; .line 406 const-string v0, "oldCount" invoke-static {p2, v0}, Lcom/google/common/collect/CollectPreconditions;->checkNonnegative(ILjava/lang/String;)I .line 407 const-string v0, "newCount" invoke-static {p3, v0}, Lcom/google/common/collect/CollectPreconditions;->checkNonnegative(ILjava/lang/String;)I .line 409 iget-object v0, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-static {v0, p1}, Lcom/google/common/collect/Maps;->safeGet(Ljava/util/Map;Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/util/concurrent/atomic/AtomicInteger; .line 410 if-nez v0, :cond_4 .line 411 if-eqz p2, :cond_1 .line 443 :cond_0 :goto_0 return v2 .line 413 :cond_1 if-nez p3, :cond_2 move v2, v1 .line 414 goto :goto_0 .line 417 :cond_2 iget-object v0, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; new-instance v3, Ljava/util/concurrent/atomic/AtomicInteger; invoke-direct {v3, p3}, Ljava/util/concurrent/atomic/AtomicInteger;->(I)V invoke-interface {v0, p1, v3}, Ljava/util/concurrent/ConcurrentMap;->putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 if-nez v0, :cond_3 move v0, v1 :goto_1 move v2, v0 goto :goto_0 :cond_3 move v0, v2 goto :goto_1 .line 420 :cond_4 invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I move-result v3 .line 421 if-ne v3, p2, :cond_0 .line 422 if-nez v3, :cond_7 .line 423 if-nez p3, :cond_5 .line 425 iget-object v2, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-interface {v2, p1, v0}, Ljava/util/concurrent/ConcurrentMap;->remove(Ljava/lang/Object;Ljava/lang/Object;)Z move v2, v1 .line 426 goto :goto_0 .line 428 :cond_5 new-instance v3, Ljava/util/concurrent/atomic/AtomicInteger; invoke-direct {v3, p3}, Ljava/util/concurrent/atomic/AtomicInteger;->(I)V .line 429 iget-object v4, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-interface {v4, p1, v3}, Ljava/util/concurrent/ConcurrentMap;->putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; move-result-object v4 if-eqz v4, :cond_6 iget-object v4, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-interface {v4, p1, v0, v3}, Ljava/util/concurrent/ConcurrentMap;->replace(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z move-result v0 if-eqz v0, :cond_0 :cond_6 move v2, v1 goto :goto_0 .line 433 :cond_7 invoke-virtual {v0, v3, p3}, Ljava/util/concurrent/atomic/AtomicInteger;->compareAndSet(II)Z move-result v3 if-eqz v3, :cond_0 .line 434 if-nez p3, :cond_8 .line 437 iget-object v2, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-interface {v2, p1, v0}, Ljava/util/concurrent/ConcurrentMap;->remove(Ljava/lang/Object;Ljava/lang/Object;)Z :cond_8 move v2, v1 .line 439 goto :goto_0 .end method .method public size()I .locals 5 .prologue .line 165 const-wide/16 v0, 0x0 .line 166 iget-object v2, p0, Lcom/google/common/collect/ConcurrentHashMultiset;->countMap:Ljava/util/concurrent/ConcurrentMap; invoke-interface {v2}, Ljava/util/concurrent/ConcurrentMap;->values()Ljava/util/Collection; move-result-object v2 invoke-interface {v2}, Ljava/util/Collection;->iterator()Ljava/util/Iterator; move-result-object v4 move-wide v2, v0 :goto_0 invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_0 invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/util/concurrent/atomic/AtomicInteger; .line 167 invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I move-result v0 int-to-long v0, v0 add-long/2addr v0, v2 move-wide v2, v0 .line 168 goto :goto_0 .line 169 :cond_0 invoke-static {v2, v3}, Lcom/google/common/primitives/Ints;->saturatedCast(J)I move-result v0 return v0 .end method .method public toArray()[Ljava/lang/Object; .locals 1 .prologue .line 178 invoke-direct {p0}, Lcom/google/common/collect/ConcurrentHashMultiset;->snapshot()Ljava/util/List; move-result-object v0 invoke-interface {v0}, Ljava/util/List;->toArray()[Ljava/lang/Object; move-result-object v0 return-object v0 .end method .method public toArray([Ljava/lang/Object;)[Ljava/lang/Object; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "([TT;)[TT;" } .end annotation .prologue .line 182 invoke-direct {p0}, Lcom/google/common/collect/ConcurrentHashMultiset;->snapshot()Ljava/util/List; move-result-object v0 invoke-interface {v0, p1}, Ljava/util/List;->toArray([Ljava/lang/Object;)[Ljava/lang/Object; move-result-object v0 return-object v0 .end method .method public bridge synthetic toString()Ljava/lang/String; .locals 1 .prologue .line 57 invoke-super {p0}, Lcom/google/common/collect/AbstractMultiset;->toString()Ljava/lang/String; move-result-object v0 return-object v0 .end method