.class public final Lcom/google/common/collect/Collections2; .super Ljava/lang/Object; .source "Collections2.java" # annotations .annotation build Lcom/google/common/annotations/GwtCompatible; .end annotation .annotation system Ldalvik/annotation/MemberClasses; value = { Lcom/google/common/collect/Collections2$PermutationIterator;, Lcom/google/common/collect/Collections2$PermutationCollection;, Lcom/google/common/collect/Collections2$OrderedPermutationIterator;, Lcom/google/common/collect/Collections2$OrderedPermutationCollection;, Lcom/google/common/collect/Collections2$TransformedCollection;, Lcom/google/common/collect/Collections2$FilteredCollection; } .end annotation # static fields .field static final STANDARD_JOINER:Lcom/google/common/base/Joiner; # direct methods .method static constructor ()V .locals 2 .prologue .line 323 const-string v0, ", " invoke-static {v0}, Lcom/google/common/base/Joiner;->on(Ljava/lang/String;)Lcom/google/common/base/Joiner; move-result-object v0 const-string v1, "null" invoke-virtual {v0, v1}, Lcom/google/common/base/Joiner;->useForNull(Ljava/lang/String;)Lcom/google/common/base/Joiner; move-result-object v0 sput-object v0, Lcom/google/common/collect/Collections2;->STANDARD_JOINER:Lcom/google/common/base/Joiner; return-void .end method .method private constructor ()V .locals 0 .prologue .line 57 invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method .method static synthetic access$000(J)Z .locals 2 .prologue .line 56 invoke-static {p0, p1}, Lcom/google/common/collect/Collections2;->isPositiveInt(J)Z move-result v0 return v0 .end method .method static synthetic access$100(Ljava/util/List;Ljava/util/List;)Z .locals 1 .prologue .line 56 invoke-static {p0, p1}, Lcom/google/common/collect/Collections2;->isPermutation(Ljava/util/List;Ljava/util/List;)Z move-result v0 return v0 .end method .method static cast(Ljava/lang/Iterable;)Ljava/util/Collection; .locals 0 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/Iterable", ";)", "Ljava/util/Collection", ";" } .end annotation .prologue .line 320 check-cast p0, Ljava/util/Collection; return-object p0 .end method .method static containsAllImpl(Ljava/util/Collection;Ljava/util/Collection;)Z .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/Collection", "<*>;", "Ljava/util/Collection", "<*>;)Z" } .end annotation .prologue .line 290 invoke-static {p0}, Lcom/google/common/base/Predicates;->in(Ljava/util/Collection;)Lcom/google/common/base/Predicate; move-result-object v0 invoke-static {p1, v0}, Lcom/google/common/collect/Iterables;->all(Ljava/lang/Iterable;Lcom/google/common/base/Predicate;)Z move-result v0 return v0 .end method .method public static filter(Ljava/util/Collection;Lcom/google/common/base/Predicate;)Ljava/util/Collection; .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/Collection", ";", "Lcom/google/common/base/Predicate", "<-TE;>;)", "Ljava/util/Collection", ";" } .end annotation .prologue .line 91 instance-of v0, p0, Lcom/google/common/collect/Collections2$FilteredCollection; if-eqz v0, :cond_0 .line 94 check-cast p0, Lcom/google/common/collect/Collections2$FilteredCollection; invoke-virtual {p0, p1}, Lcom/google/common/collect/Collections2$FilteredCollection;->createCombined(Lcom/google/common/base/Predicate;)Lcom/google/common/collect/Collections2$FilteredCollection; move-result-object v0 .line 97 :goto_0 return-object v0 :cond_0 new-instance v2, Lcom/google/common/collect/Collections2$FilteredCollection; invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/util/Collection; invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v1 check-cast v1, Lcom/google/common/base/Predicate; invoke-direct {v2, v0, v1}, Lcom/google/common/collect/Collections2$FilteredCollection;->(Ljava/util/Collection;Lcom/google/common/base/Predicate;)V move-object v0, v2 goto :goto_0 .end method .method private static isPermutation(Ljava/util/List;Ljava/util/List;)Z .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/List", "<*>;", "Ljava/util/List", "<*>;)Z" } .end annotation .prologue .line 663 invoke-interface {p0}, Ljava/util/List;->size()I move-result v0 invoke-interface {p1}, Ljava/util/List;->size()I move-result v1 if-eq v0, v1, :cond_0 .line 664 const/4 v0, 0x0 .line 668 :goto_0 return v0 .line 666 :cond_0 invoke-static {p0}, Lcom/google/common/collect/HashMultiset;->create(Ljava/lang/Iterable;)Lcom/google/common/collect/HashMultiset; move-result-object v0 .line 667 invoke-static {p1}, Lcom/google/common/collect/HashMultiset;->create(Ljava/lang/Iterable;)Lcom/google/common/collect/HashMultiset; move-result-object v1 .line 668 invoke-interface {v0, v1}, Lcom/google/common/collect/Multiset;->equals(Ljava/lang/Object;)Z move-result v0 goto :goto_0 .end method .method private static isPositiveInt(J)Z .locals 2 .prologue .line 672 const-wide/16 v0, 0x0 cmp-long v0, p0, v0 if-ltz v0, :cond_0 const-wide/32 v0, 0x7fffffff cmp-long v0, p0, v0 if-gtz v0, :cond_0 const/4 v0, 0x1 :goto_0 return v0 :cond_0 const/4 v0, 0x0 goto :goto_0 .end method .method static newStringBuilderForCollection(I)Ljava/lang/StringBuilder; .locals 6 .prologue .line 312 const-string v0, "size" invoke-static {p0, v0}, Lcom/google/common/collect/CollectPreconditions;->checkNonnegative(ILjava/lang/String;)I .line 313 new-instance v0, Ljava/lang/StringBuilder; int-to-long v2, p0 const-wide/16 v4, 0x8 mul-long/2addr v2, v4 const-wide/32 v4, 0x40000000 invoke-static {v2, v3, v4, v5}, Ljava/lang/Math;->min(JJ)J move-result-wide v2 long-to-int v1, v2 invoke-direct {v0, v1}, Ljava/lang/StringBuilder;->(I)V return-object v0 .end method .method public static orderedPermutations(Ljava/lang/Iterable;)Ljava/util/Collection; .locals 1 .annotation build Lcom/google/common/annotations/Beta; .end annotation .annotation system Ldalvik/annotation/Signature; value = { ";>(", "Ljava/lang/Iterable", ";)", "Ljava/util/Collection", "<", "Ljava/util/List", ";>;" } .end annotation .prologue .line 354 invoke-static {}, Lcom/google/common/collect/Ordering;->natural()Lcom/google/common/collect/Ordering; move-result-object v0 invoke-static {p0, v0}, Lcom/google/common/collect/Collections2;->orderedPermutations(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/Collection; move-result-object v0 return-object v0 .end method .method public static orderedPermutations(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/Collection; .locals 1 .annotation build Lcom/google/common/annotations/Beta; .end annotation .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/Iterable", ";", "Ljava/util/Comparator", "<-TE;>;)", "Ljava/util/Collection", "<", "Ljava/util/List", ";>;" } .end annotation .prologue .line 406 new-instance v0, Lcom/google/common/collect/Collections2$OrderedPermutationCollection; invoke-direct {v0, p0, p1}, Lcom/google/common/collect/Collections2$OrderedPermutationCollection;->(Ljava/lang/Iterable;Ljava/util/Comparator;)V return-object v0 .end method .method public static permutations(Ljava/util/Collection;)Ljava/util/Collection; .locals 2 .annotation build Lcom/google/common/annotations/Beta; .end annotation .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/Collection", ";)", "Ljava/util/Collection", "<", "Ljava/util/List", ";>;" } .end annotation .prologue .line 559 new-instance v0, Lcom/google/common/collect/Collections2$PermutationCollection; invoke-static {p0}, Lcom/google/common/collect/ImmutableList;->copyOf(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableList; move-result-object v1 invoke-direct {v0, v1}, Lcom/google/common/collect/Collections2$PermutationCollection;->(Lcom/google/common/collect/ImmutableList;)V return-object v0 .end method .method static safeContains(Ljava/util/Collection;Ljava/lang/Object;)Z .locals 2 .param p1 # Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/Collection", "<*>;", "Ljava/lang/Object;", ")Z" } .end annotation .prologue const/4 v0, 0x0 .line 108 invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; .line 110 :try_start_0 invoke-interface {p0, p1}, Ljava/util/Collection;->contains(Ljava/lang/Object;)Z :try_end_0 .catch Ljava/lang/ClassCastException; {:try_start_0 .. :try_end_0} :catch_0 .catch Ljava/lang/NullPointerException; {:try_start_0 .. :try_end_0} :catch_1 move-result v0 .line 114 :goto_0 return v0 .line 111 :catch_0 move-exception v1 goto :goto_0 .line 113 :catch_1 move-exception v1 goto :goto_0 .end method .method static safeRemove(Ljava/util/Collection;Ljava/lang/Object;)Z .locals 2 .param p1 # Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/Collection", "<*>;", "Ljava/lang/Object;", ")Z" } .end annotation .prologue const/4 v0, 0x0 .line 124 invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; .line 126 :try_start_0 invoke-interface {p0, p1}, Ljava/util/Collection;->remove(Ljava/lang/Object;)Z :try_end_0 .catch Ljava/lang/ClassCastException; {:try_start_0 .. :try_end_0} :catch_0 .catch Ljava/lang/NullPointerException; {:try_start_0 .. :try_end_0} :catch_1 move-result v0 .line 130 :goto_0 return v0 .line 127 :catch_0 move-exception v1 goto :goto_0 .line 129 :catch_1 move-exception v1 goto :goto_0 .end method .method static toStringImpl(Ljava/util/Collection;)Ljava/lang/String; .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/Collection", "<*>;)", "Ljava/lang/String;" } .end annotation .prologue .line 297 invoke-interface {p0}, Ljava/util/Collection;->size()I move-result v0 invoke-static {v0}, Lcom/google/common/collect/Collections2;->newStringBuilderForCollection(I)Ljava/lang/StringBuilder; move-result-object v0 const/16 v1, 0x5b invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; move-result-object v0 .line 299 sget-object v1, Lcom/google/common/collect/Collections2;->STANDARD_JOINER:Lcom/google/common/base/Joiner; new-instance v2, Lcom/google/common/collect/Collections2$1; invoke-direct {v2, p0}, Lcom/google/common/collect/Collections2$1;->(Ljava/util/Collection;)V invoke-static {p0, v2}, Lcom/google/common/collect/Iterables;->transform(Ljava/lang/Iterable;Lcom/google/common/base/Function;)Ljava/lang/Iterable; move-result-object v2 invoke-virtual {v1, v0, v2}, Lcom/google/common/base/Joiner;->appendTo(Ljava/lang/StringBuilder;Ljava/lang/Iterable;)Ljava/lang/StringBuilder; .line 305 const/16 v1, 0x5d invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 return-object v0 .end method .method public static transform(Ljava/util/Collection;Lcom/google/common/base/Function;)Ljava/util/Collection; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/Collection", ";", "Lcom/google/common/base/Function", "<-TF;TT;>;)", "Ljava/util/Collection", ";" } .end annotation .prologue .line 247 new-instance v0, Lcom/google/common/collect/Collections2$TransformedCollection; invoke-direct {v0, p0, p1}, Lcom/google/common/collect/Collections2$TransformedCollection;->(Ljava/util/Collection;Lcom/google/common/base/Function;)V return-object v0 .end method