今奥全景相机
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

343 lines
8.0 KiB

.class final Lcom/google/common/collect/Sets$PowerSet;
.super Ljava/util/AbstractSet;
.source "Sets.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/collect/Sets;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1a
name = "PowerSet"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Object;",
">",
"Ljava/util/AbstractSet",
"<",
"Ljava/util/Set",
"<TE;>;>;"
}
.end annotation
# instance fields
.field final inputSet:Lcom/google/common/collect/ImmutableMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/google/common/collect/ImmutableMap",
"<TE;",
"Ljava/lang/Integer;",
">;"
}
.end annotation
.end field
# direct methods
.method constructor <init>(Ljava/util/Set;)V
.locals 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Set",
"<TE;>;)V"
}
.end annotation
.prologue
const/4 v3, 0x1
const/4 v1, 0x0
.line 1253
invoke-direct {p0}, Ljava/util/AbstractSet;-><init>()V
.line 1254
invoke-static {}, Lcom/google/common/collect/ImmutableMap;->builder()Lcom/google/common/collect/ImmutableMap$Builder;
move-result-object v4
.line 1256
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/Set;
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v5
move v0, v1
:goto_0
invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_0
invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v6
.line 1257
add-int/lit8 v2, v0, 0x1
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
invoke-virtual {v4, v6, v0}, Lcom/google/common/collect/ImmutableMap$Builder;->put(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap$Builder;
move v0, v2
.line 1258
goto :goto_0
.line 1259
:cond_0
invoke-virtual {v4}, Lcom/google/common/collect/ImmutableMap$Builder;->build()Lcom/google/common/collect/ImmutableMap;
move-result-object v0
iput-object v0, p0, Lcom/google/common/collect/Sets$PowerSet;->inputSet:Lcom/google/common/collect/ImmutableMap;
.line 1260
iget-object v0, p0, Lcom/google/common/collect/Sets$PowerSet;->inputSet:Lcom/google/common/collect/ImmutableMap;
invoke-virtual {v0}, Lcom/google/common/collect/ImmutableMap;->size()I
move-result v0
const/16 v2, 0x1e
if-gt v0, v2, :cond_1
move v0, v3
:goto_1
const-string v2, "Too many elements to create power set: %s > 30"
new-array v3, v3, [Ljava/lang/Object;
iget-object v4, p0, Lcom/google/common/collect/Sets$PowerSet;->inputSet:Lcom/google/common/collect/ImmutableMap;
invoke-virtual {v4}, Lcom/google/common/collect/ImmutableMap;->size()I
move-result v4
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
aput-object v4, v3, v1
invoke-static {v0, v2, v3}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;[Ljava/lang/Object;)V
.line 1262
return-void
:cond_1
move v0, v1
.line 1260
goto :goto_1
.end method
# virtual methods
.method public contains(Ljava/lang/Object;)Z
.locals 1
.param p1 # Ljava/lang/Object;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
.prologue
.line 1281
instance-of v0, p1, Ljava/util/Set;
if-eqz v0, :cond_0
.line 1282
check-cast p1, Ljava/util/Set;
.line 1283
iget-object v0, p0, Lcom/google/common/collect/Sets$PowerSet;->inputSet:Lcom/google/common/collect/ImmutableMap;
invoke-virtual {v0}, Lcom/google/common/collect/ImmutableMap;->keySet()Lcom/google/common/collect/ImmutableSet;
move-result-object v0
invoke-virtual {v0, p1}, Lcom/google/common/collect/ImmutableSet;->containsAll(Ljava/util/Collection;)Z
move-result v0
.line 1285
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method public equals(Ljava/lang/Object;)Z
.locals 2
.param p1 # Ljava/lang/Object;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
.prologue
.line 1289
instance-of v0, p1, Lcom/google/common/collect/Sets$PowerSet;
if-eqz v0, :cond_0
.line 1290
check-cast p1, Lcom/google/common/collect/Sets$PowerSet;
.line 1291
iget-object v0, p0, Lcom/google/common/collect/Sets$PowerSet;->inputSet:Lcom/google/common/collect/ImmutableMap;
iget-object v1, p1, Lcom/google/common/collect/Sets$PowerSet;->inputSet:Lcom/google/common/collect/ImmutableMap;
invoke-virtual {v0, v1}, Lcom/google/common/collect/ImmutableMap;->equals(Ljava/lang/Object;)Z
move-result v0
.line 1293
:goto_0
return v0
:cond_0
invoke-super {p0, p1}, Ljava/util/AbstractSet;->equals(Ljava/lang/Object;)Z
move-result v0
goto :goto_0
.end method
.method public hashCode()I
.locals 2
.prologue
.line 1302
iget-object v0, p0, Lcom/google/common/collect/Sets$PowerSet;->inputSet:Lcom/google/common/collect/ImmutableMap;
invoke-virtual {v0}, Lcom/google/common/collect/ImmutableMap;->keySet()Lcom/google/common/collect/ImmutableSet;
move-result-object v0
invoke-virtual {v0}, Lcom/google/common/collect/ImmutableSet;->hashCode()I
move-result v0
iget-object v1, p0, Lcom/google/common/collect/Sets$PowerSet;->inputSet:Lcom/google/common/collect/ImmutableMap;
invoke-virtual {v1}, Lcom/google/common/collect/ImmutableMap;->size()I
move-result v1
add-int/lit8 v1, v1, -0x1
shl-int/2addr v0, v1
return v0
.end method
.method public isEmpty()Z
.locals 1
.prologue
.line 1269
const/4 v0, 0x0
return v0
.end method
.method public iterator()Ljava/util/Iterator;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Iterator",
"<",
"Ljava/util/Set",
"<TE;>;>;"
}
.end annotation
.prologue
.line 1273
new-instance v0, Lcom/google/common/collect/Sets$PowerSet$1;
invoke-virtual {p0}, Lcom/google/common/collect/Sets$PowerSet;->size()I
move-result v1
invoke-direct {v0, p0, v1}, Lcom/google/common/collect/Sets$PowerSet$1;-><init>(Lcom/google/common/collect/Sets$PowerSet;I)V
return-object v0
.end method
.method public size()I
.locals 2
.prologue
.line 1265
const/4 v0, 0x1
iget-object v1, p0, Lcom/google/common/collect/Sets$PowerSet;->inputSet:Lcom/google/common/collect/ImmutableMap;
invoke-virtual {v1}, Lcom/google/common/collect/ImmutableMap;->size()I
move-result v1
shl-int/2addr v0, v1
return v0
.end method
.method public toString()Ljava/lang/String;
.locals 2
.prologue
.line 1306
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "powerSet("
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
iget-object v1, p0, Lcom/google/common/collect/Sets$PowerSet;->inputSet:Lcom/google/common/collect/ImmutableMap;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, ")"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)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