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.
279 lines
7.3 KiB
279 lines
7.3 KiB
.class final Lcom/google/common/base/FunctionalEquivalence; |
|
.super Lcom/google/common/base/Equivalence; |
|
.source "FunctionalEquivalence.java" |
|
|
|
# interfaces |
|
.implements Ljava/io/Serializable; |
|
|
|
|
|
# annotations |
|
.annotation build Lcom/google/common/annotations/Beta; |
|
.end annotation |
|
|
|
.annotation build Lcom/google/common/annotations/GwtCompatible; |
|
.end annotation |
|
|
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"<F:", |
|
"Ljava/lang/Object;", |
|
"T:", |
|
"Ljava/lang/Object;", |
|
">", |
|
"Lcom/google/common/base/Equivalence", |
|
"<TF;>;", |
|
"Ljava/io/Serializable;" |
|
} |
|
.end annotation |
|
|
|
|
|
# static fields |
|
.field private static final serialVersionUID:J |
|
|
|
|
|
# instance fields |
|
.field private final function:Lcom/google/common/base/Function; |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"Lcom/google/common/base/Function", |
|
"<TF;+TT;>;" |
|
} |
|
.end annotation |
|
.end field |
|
|
|
.field private final resultEquivalence:Lcom/google/common/base/Equivalence; |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"Lcom/google/common/base/Equivalence", |
|
"<TT;>;" |
|
} |
|
.end annotation |
|
.end field |
|
|
|
|
|
# direct methods |
|
.method constructor <init>(Lcom/google/common/base/Function;Lcom/google/common/base/Equivalence;)V |
|
.locals 1 |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"(", |
|
"Lcom/google/common/base/Function", |
|
"<TF;+TT;>;", |
|
"Lcom/google/common/base/Equivalence", |
|
"<TT;>;)V" |
|
} |
|
.end annotation |
|
|
|
.prologue |
|
.line 45 |
|
invoke-direct {p0}, Lcom/google/common/base/Equivalence;-><init>()V |
|
|
|
.line 46 |
|
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/base/Function; |
|
|
|
iput-object v0, p0, Lcom/google/common/base/FunctionalEquivalence;->function:Lcom/google/common/base/Function; |
|
|
|
.line 47 |
|
invoke-static {p2}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Lcom/google/common/base/Equivalence; |
|
|
|
iput-object v0, p0, Lcom/google/common/base/FunctionalEquivalence;->resultEquivalence:Lcom/google/common/base/Equivalence; |
|
|
|
.line 48 |
|
return-void |
|
.end method |
|
|
|
|
|
# virtual methods |
|
.method protected doEquivalent(Ljava/lang/Object;Ljava/lang/Object;)Z |
|
.locals 3 |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"(TF;TF;)Z" |
|
} |
|
.end annotation |
|
|
|
.prologue |
|
.line 51 |
|
iget-object v0, p0, Lcom/google/common/base/FunctionalEquivalence;->resultEquivalence:Lcom/google/common/base/Equivalence; |
|
|
|
iget-object v1, p0, Lcom/google/common/base/FunctionalEquivalence;->function:Lcom/google/common/base/Function; |
|
|
|
invoke-interface {v1, p1}, Lcom/google/common/base/Function;->apply(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v1 |
|
|
|
iget-object v2, p0, Lcom/google/common/base/FunctionalEquivalence;->function:Lcom/google/common/base/Function; |
|
|
|
invoke-interface {v2, p2}, Lcom/google/common/base/Function;->apply(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v2 |
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z |
|
|
|
move-result v0 |
|
|
|
return v0 |
|
.end method |
|
|
|
.method protected doHash(Ljava/lang/Object;)I |
|
.locals 2 |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"(TF;)I" |
|
} |
|
.end annotation |
|
|
|
.prologue |
|
.line 55 |
|
iget-object v0, p0, Lcom/google/common/base/FunctionalEquivalence;->resultEquivalence:Lcom/google/common/base/Equivalence; |
|
|
|
iget-object v1, p0, Lcom/google/common/base/FunctionalEquivalence;->function:Lcom/google/common/base/Function; |
|
|
|
invoke-interface {v1, p1}, Lcom/google/common/base/Function;->apply(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v0, v1}, Lcom/google/common/base/Equivalence;->hash(Ljava/lang/Object;)I |
|
|
|
move-result v0 |
|
|
|
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 v0, 0x1 |
|
|
|
const/4 v1, 0x0 |
|
|
|
.line 59 |
|
if-ne p1, p0, :cond_1 |
|
|
|
.line 67 |
|
:cond_0 |
|
:goto_0 |
|
return v0 |
|
|
|
.line 62 |
|
:cond_1 |
|
instance-of v2, p1, Lcom/google/common/base/FunctionalEquivalence; |
|
|
|
if-eqz v2, :cond_3 |
|
|
|
.line 63 |
|
check-cast p1, Lcom/google/common/base/FunctionalEquivalence; |
|
|
|
.line 64 |
|
iget-object v2, p0, Lcom/google/common/base/FunctionalEquivalence;->function:Lcom/google/common/base/Function; |
|
|
|
iget-object v3, p1, Lcom/google/common/base/FunctionalEquivalence;->function:Lcom/google/common/base/Function; |
|
|
|
invoke-interface {v2, v3}, Lcom/google/common/base/Function;->equals(Ljava/lang/Object;)Z |
|
|
|
move-result v2 |
|
|
|
if-eqz v2, :cond_2 |
|
|
|
iget-object v2, p0, Lcom/google/common/base/FunctionalEquivalence;->resultEquivalence:Lcom/google/common/base/Equivalence; |
|
|
|
iget-object v3, p1, Lcom/google/common/base/FunctionalEquivalence;->resultEquivalence:Lcom/google/common/base/Equivalence; |
|
|
|
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 67 |
|
goto :goto_0 |
|
.end method |
|
|
|
.method public hashCode()I |
|
.locals 3 |
|
|
|
.prologue |
|
.line 71 |
|
const/4 v0, 0x2 |
|
|
|
new-array v0, v0, [Ljava/lang/Object; |
|
|
|
const/4 v1, 0x0 |
|
|
|
iget-object v2, p0, Lcom/google/common/base/FunctionalEquivalence;->function:Lcom/google/common/base/Function; |
|
|
|
aput-object v2, v0, v1 |
|
|
|
const/4 v1, 0x1 |
|
|
|
iget-object v2, p0, Lcom/google/common/base/FunctionalEquivalence;->resultEquivalence:Lcom/google/common/base/Equivalence; |
|
|
|
aput-object v2, v0, v1 |
|
|
|
invoke-static {v0}, Lcom/google/common/base/Objects;->hashCode([Ljava/lang/Object;)I |
|
|
|
move-result v0 |
|
|
|
return v0 |
|
.end method |
|
|
|
.method public toString()Ljava/lang/String; |
|
.locals 2 |
|
|
|
.prologue |
|
.line 75 |
|
new-instance v0, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
iget-object v1, p0, Lcom/google/common/base/FunctionalEquivalence;->resultEquivalence:Lcom/google/common/base/Equivalence; |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v1, ".onResultOf(" |
|
|
|
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/base/FunctionalEquivalence;->function:Lcom/google/common/base/Function; |
|
|
|
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
|
|
|