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.
326 lines
6.7 KiB
326 lines
6.7 KiB
.class final Lcom/google/common/collect/SingletonImmutableSet; |
|
.super Lcom/google/common/collect/ImmutableSet; |
|
.source "SingletonImmutableSet.java" |
|
|
|
|
|
# annotations |
|
.annotation build Lcom/google/common/annotations/GwtCompatible; |
|
emulated = true |
|
serializable = true |
|
.end annotation |
|
|
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"<E:", |
|
"Ljava/lang/Object;", |
|
">", |
|
"Lcom/google/common/collect/ImmutableSet", |
|
"<TE;>;" |
|
} |
|
.end annotation |
|
|
|
|
|
# instance fields |
|
.field private transient cachedHashCode:I |
|
|
|
.field final transient element:Ljava/lang/Object; |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"TE;" |
|
} |
|
.end annotation |
|
.end field |
|
|
|
|
|
# direct methods |
|
.method constructor <init>(Ljava/lang/Object;)V |
|
.locals 1 |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"(TE;)V" |
|
} |
|
.end annotation |
|
|
|
.prologue |
|
.line 46 |
|
invoke-direct {p0}, Lcom/google/common/collect/ImmutableSet;-><init>()V |
|
|
|
.line 47 |
|
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
iput-object v0, p0, Lcom/google/common/collect/SingletonImmutableSet;->element:Ljava/lang/Object; |
|
|
|
.line 48 |
|
return-void |
|
.end method |
|
|
|
.method constructor <init>(Ljava/lang/Object;I)V |
|
.locals 0 |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"(TE;I)V" |
|
} |
|
.end annotation |
|
|
|
.prologue |
|
.line 50 |
|
invoke-direct {p0}, Lcom/google/common/collect/ImmutableSet;-><init>()V |
|
|
|
.line 52 |
|
iput-object p1, p0, Lcom/google/common/collect/SingletonImmutableSet;->element:Ljava/lang/Object; |
|
|
|
.line 53 |
|
iput p2, p0, Lcom/google/common/collect/SingletonImmutableSet;->cachedHashCode:I |
|
|
|
.line 54 |
|
return-void |
|
.end method |
|
|
|
|
|
# virtual methods |
|
.method public contains(Ljava/lang/Object;)Z |
|
.locals 1 |
|
|
|
.prologue |
|
.line 66 |
|
iget-object v0, p0, Lcom/google/common/collect/SingletonImmutableSet;->element:Ljava/lang/Object; |
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z |
|
|
|
move-result v0 |
|
|
|
return v0 |
|
.end method |
|
|
|
.method copyIntoArray([Ljava/lang/Object;I)I |
|
.locals 1 |
|
|
|
.prologue |
|
.line 79 |
|
iget-object v0, p0, Lcom/google/common/collect/SingletonImmutableSet;->element:Ljava/lang/Object; |
|
|
|
aput-object v0, p1, p2 |
|
|
|
.line 80 |
|
add-int/lit8 v0, p2, 0x1 |
|
|
|
return v0 |
|
.end method |
|
|
|
.method public equals(Ljava/lang/Object;)Z |
|
.locals 4 |
|
.param p1 # Ljava/lang/Object; |
|
.annotation runtime Ljavax/annotation/Nullable; |
|
.end annotation |
|
.end param |
|
|
|
.prologue |
|
const/4 v1, 0x0 |
|
|
|
const/4 v0, 0x1 |
|
|
|
.line 84 |
|
if-ne p1, p0, :cond_1 |
|
|
|
.line 91 |
|
:cond_0 |
|
:goto_0 |
|
return v0 |
|
|
|
.line 87 |
|
:cond_1 |
|
instance-of v2, p1, Ljava/util/Set; |
|
|
|
if-eqz v2, :cond_3 |
|
|
|
.line 88 |
|
check-cast p1, Ljava/util/Set; |
|
|
|
.line 89 |
|
invoke-interface {p1}, Ljava/util/Set;->size()I |
|
|
|
move-result v2 |
|
|
|
if-ne v2, v0, :cond_2 |
|
|
|
iget-object v2, p0, Lcom/google/common/collect/SingletonImmutableSet;->element:Ljava/lang/Object; |
|
|
|
invoke-interface {p1}, Ljava/util/Set;->iterator()Ljava/util/Iterator; |
|
|
|
move-result-object v3 |
|
|
|
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object; |
|
|
|
move-result-object v3 |
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z |
|
|
|
move-result v2 |
|
|
|
if-nez v2, :cond_0 |
|
|
|
:cond_2 |
|
move v0, v1 |
|
|
|
goto :goto_0 |
|
|
|
:cond_3 |
|
move v0, v1 |
|
|
|
.line 91 |
|
goto :goto_0 |
|
.end method |
|
|
|
.method public final hashCode()I |
|
.locals 1 |
|
|
|
.prologue |
|
.line 96 |
|
iget v0, p0, Lcom/google/common/collect/SingletonImmutableSet;->cachedHashCode:I |
|
|
|
.line 97 |
|
if-nez v0, :cond_0 |
|
|
|
.line 98 |
|
iget-object v0, p0, Lcom/google/common/collect/SingletonImmutableSet;->element:Ljava/lang/Object; |
|
|
|
invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I |
|
|
|
move-result v0 |
|
|
|
iput v0, p0, Lcom/google/common/collect/SingletonImmutableSet;->cachedHashCode:I |
|
|
|
.line 100 |
|
:cond_0 |
|
return v0 |
|
.end method |
|
|
|
.method public isEmpty()Z |
|
.locals 1 |
|
|
|
.prologue |
|
.line 62 |
|
const/4 v0, 0x0 |
|
|
|
return v0 |
|
.end method |
|
|
|
.method isHashCodeFast()Z |
|
.locals 1 |
|
|
|
.prologue |
|
.line 104 |
|
iget v0, p0, Lcom/google/common/collect/SingletonImmutableSet;->cachedHashCode:I |
|
|
|
if-eqz v0, :cond_0 |
|
|
|
const/4 v0, 0x1 |
|
|
|
:goto_0 |
|
return v0 |
|
|
|
:cond_0 |
|
const/4 v0, 0x0 |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
.method isPartialView()Z |
|
.locals 1 |
|
|
|
.prologue |
|
.line 74 |
|
const/4 v0, 0x0 |
|
|
|
return v0 |
|
.end method |
|
|
|
.method public iterator()Lcom/google/common/collect/UnmodifiableIterator; |
|
.locals 1 |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"()", |
|
"Lcom/google/common/collect/UnmodifiableIterator", |
|
"<TE;>;" |
|
} |
|
.end annotation |
|
|
|
.prologue |
|
.line 70 |
|
iget-object v0, p0, Lcom/google/common/collect/SingletonImmutableSet;->element:Ljava/lang/Object; |
|
|
|
invoke-static {v0}, Lcom/google/common/collect/Iterators;->singletonIterator(Ljava/lang/Object;)Lcom/google/common/collect/UnmodifiableIterator; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public bridge synthetic iterator()Ljava/util/Iterator; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 32 |
|
invoke-virtual {p0}, Lcom/google/common/collect/SingletonImmutableSet;->iterator()Lcom/google/common/collect/UnmodifiableIterator; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public size()I |
|
.locals 1 |
|
|
|
.prologue |
|
.line 58 |
|
const/4 v0, 0x1 |
|
|
|
return v0 |
|
.end method |
|
|
|
.method public toString()Ljava/lang/String; |
|
.locals 3 |
|
|
|
.prologue |
|
.line 108 |
|
iget-object v0, p0, Lcom/google/common/collect/SingletonImmutableSet;->element:Ljava/lang/Object; |
|
|
|
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
.line 109 |
|
new-instance v1, Ljava/lang/StringBuilder; |
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->length()I |
|
|
|
move-result v2 |
|
|
|
add-int/lit8 v2, v2, 0x2 |
|
|
|
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(I)V |
|
|
|
const/16 v2, 0x5b |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
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
|
|
|