256 lines
6.5 KiB
Smali
256 lines
6.5 KiB
Smali
.class final Lio/reactivex/internal/operators/flowable/FlowableElementAt$ElementAtSubscriber;
|
|
.super Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;
|
|
.source "FlowableElementAt.java"
|
|
|
|
# interfaces
|
|
.implements Lkh/o;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lio/reactivex/internal/operators/flowable/FlowableElementAt;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "ElementAtSubscriber"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Lio/reactivex/internal/subscriptions/DeferredScalarSubscription<",
|
|
"TT;>;",
|
|
"Lkh/o<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final serialVersionUID:J = 0x386f7dd17fceb6ddL
|
|
|
|
|
|
# instance fields
|
|
.field public count:J
|
|
|
|
.field public final defaultValue:Ljava/lang/Object;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"TT;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public done:Z
|
|
|
|
.field public final errorOnFewer:Z
|
|
|
|
.field public final index:J
|
|
|
|
.field public upstream:Lok/e;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lok/d;JLjava/lang/Object;Z)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lok/d<",
|
|
"-TT;>;JTT;Z)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-direct {p0, p1}, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;-><init>(Lok/d;)V
|
|
|
|
.line 2
|
|
iput-wide p2, p0, Lio/reactivex/internal/operators/flowable/FlowableElementAt$ElementAtSubscriber;->index:J
|
|
|
|
.line 3
|
|
iput-object p4, p0, Lio/reactivex/internal/operators/flowable/FlowableElementAt$ElementAtSubscriber;->defaultValue:Ljava/lang/Object;
|
|
|
|
.line 4
|
|
iput-boolean p5, p0, Lio/reactivex/internal/operators/flowable/FlowableElementAt$ElementAtSubscriber;->errorOnFewer:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public cancel()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-super {p0}, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->cancel()V
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableElementAt$ElementAtSubscriber;->upstream:Lok/e;
|
|
|
|
invoke-interface {v0}, Lok/e;->cancel()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onComplete()V
|
|
.locals 2
|
|
|
|
.line 1
|
|
iget-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableElementAt$ElementAtSubscriber;->done:Z
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 2
|
|
iput-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableElementAt$ElementAtSubscriber;->done:Z
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableElementAt$ElementAtSubscriber;->defaultValue:Ljava/lang/Object;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 4
|
|
iget-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableElementAt$ElementAtSubscriber;->errorOnFewer:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 5
|
|
iget-object v0, p0, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->downstream:Lok/d;
|
|
|
|
new-instance v1, Ljava/util/NoSuchElementException;
|
|
|
|
invoke-direct {v1}, Ljava/util/NoSuchElementException;-><init>()V
|
|
|
|
invoke-interface {v0, v1}, Lok/d;->onError(Ljava/lang/Throwable;)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 6
|
|
:cond_0
|
|
iget-object v0, p0, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->downstream:Lok/d;
|
|
|
|
invoke-interface {v0}, Lok/d;->onComplete()V
|
|
|
|
goto :goto_0
|
|
|
|
.line 7
|
|
:cond_1
|
|
invoke-virtual {p0, v0}, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->complete(Ljava/lang/Object;)V
|
|
|
|
:cond_2
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public onError(Ljava/lang/Throwable;)V
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableElementAt$ElementAtSubscriber;->done:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-static {p1}, Lwh/a;->Y(Ljava/lang/Throwable;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
.line 3
|
|
iput-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableElementAt$ElementAtSubscriber;->done:Z
|
|
|
|
.line 4
|
|
iget-object v0, p0, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->downstream:Lok/d;
|
|
|
|
invoke-interface {v0, p1}, Lok/d;->onError(Ljava/lang/Throwable;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onNext(Ljava/lang/Object;)V
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TT;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableElementAt$ElementAtSubscriber;->done:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 2
|
|
:cond_0
|
|
iget-wide v0, p0, Lio/reactivex/internal/operators/flowable/FlowableElementAt$ElementAtSubscriber;->count:J
|
|
|
|
.line 3
|
|
iget-wide v2, p0, Lio/reactivex/internal/operators/flowable/FlowableElementAt$ElementAtSubscriber;->index:J
|
|
|
|
cmp-long v2, v0, v2
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 4
|
|
iput-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableElementAt$ElementAtSubscriber;->done:Z
|
|
|
|
.line 5
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableElementAt$ElementAtSubscriber;->upstream:Lok/e;
|
|
|
|
invoke-interface {v0}, Lok/e;->cancel()V
|
|
|
|
.line 6
|
|
invoke-virtual {p0, p1}, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->complete(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
const-wide/16 v2, 0x1
|
|
|
|
add-long/2addr v0, v2
|
|
|
|
.line 7
|
|
iput-wide v0, p0, Lio/reactivex/internal/operators/flowable/FlowableElementAt$ElementAtSubscriber;->count:J
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onSubscribe(Lok/e;)V
|
|
.locals 2
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableElementAt$ElementAtSubscriber;->upstream:Lok/e;
|
|
|
|
invoke-static {v0, p1}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->validate(Lok/e;Lok/e;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableElementAt$ElementAtSubscriber;->upstream:Lok/e;
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->downstream:Lok/d;
|
|
|
|
invoke-interface {v0, p0}, Lok/d;->onSubscribe(Lok/e;)V
|
|
|
|
const-wide v0, 0x7fffffffffffffffL
|
|
|
|
.line 4
|
|
invoke-interface {p1, v0, v1}, Lok/e;->request(J)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|