FlowableSkipLast$SkipLastSubscriber.smali
.class final Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;
.super Ljava/util/ArrayDeque;
.source "FlowableSkipLast.java"
# interfaces
.implements Lio/reactivex/FlowableSubscriber;
.implements Lorg/reactivestreams/Subscription;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lio/reactivex/internal/operators/flowable/FlowableSkipLast;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x18
name = "SkipLastSubscriber"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/util/ArrayDeque<",
"TT;>;",
"Lio/reactivex/FlowableSubscriber<",
"TT;>;",
"Lorg/reactivestreams/Subscription;"
}
.end annotation
# static fields
.field private static final serialVersionUID:J = -0x34d6eda843bdac95L
# instance fields
.field final actual:Lorg/reactivestreams/Subscriber;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lorg/reactivestreams/Subscriber<",
"-TT;>;"
}
.end annotation
.end field
.field s:Lorg/reactivestreams/Subscription;
.field final skip:I
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method constructor <init>(Lorg/reactivestreams/Subscriber;I)V
.registers 3
.param p2, "skip" # I
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lorg/reactivestreams/Subscriber<",
"-TT;>;I)V"
}
.end annotation
.line 45
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber<TT;>;"
.local p1, "actual":Lorg/reactivestreams/Subscriber;, "Lorg/reactivestreams/Subscriber<-TT;>;"
invoke-direct {p0, p2}, Ljava/util/ArrayDeque;-><init>(I)V
.line 46
iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;->actual:Lorg/reactivestreams/Subscriber;
.line 47
iput p2, p0, Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;->skip:I
.line 48
return-void
.end method
# virtual methods
.method public cancel()V
.registers 2
.line 85
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber<TT;>;"
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;->s:Lorg/reactivestreams/Subscription;
invoke-interface {v0}, Lorg/reactivestreams/Subscription;->cancel()V
.line 86
return-void
.end method
.method public onComplete()V
.registers 2
.line 75
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber<TT;>;"
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;->actual:Lorg/reactivestreams/Subscriber;
invoke-interface {v0}, Lorg/reactivestreams/Subscriber;->onComplete()V
.line 76
return-void
.end method
.method public onError(Ljava/lang/Throwable;)V
.registers 3
.param p1, "t" # Ljava/lang/Throwable;
.line 70
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber<TT;>;"
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;->actual:Lorg/reactivestreams/Subscriber;
invoke-interface {v0, p1}, Lorg/reactivestreams/Subscriber;->onError(Ljava/lang/Throwable;)V
.line 71
return-void
.end method
.method public onNext(Ljava/lang/Object;)V
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)V"
}
.end annotation
.line 60
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber<TT;>;"
.local p1, "t":Ljava/lang/Object;, "TT;"
iget v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;->skip:I
invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;->size()I
move-result v1
if-ne v0, v1, :cond_12
.line 61
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;->actual:Lorg/reactivestreams/Subscriber;
invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;->poll()Ljava/lang/Object;
move-result-object v1
invoke-interface {v0, v1}, Lorg/reactivestreams/Subscriber;->onNext(Ljava/lang/Object;)V
goto :goto_19
.line 63
:cond_12
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;->s:Lorg/reactivestreams/Subscription;
const-wide/16 v1, 0x1
invoke-interface {v0, v1, v2}, Lorg/reactivestreams/Subscription;->request(J)V
.line 65
:goto_19
invoke-virtual {p0, p1}, Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;->offer(Ljava/lang/Object;)Z
.line 66
return-void
.end method
.method public onSubscribe(Lorg/reactivestreams/Subscription;)V
.registers 3
.param p1, "s" # Lorg/reactivestreams/Subscription;
.line 52
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber<TT;>;"
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;->s:Lorg/reactivestreams/Subscription;
invoke-static {v0, p1}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->validate(Lorg/reactivestreams/Subscription;Lorg/reactivestreams/Subscription;)Z
move-result v0
if-eqz v0, :cond_f
.line 53
iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;->s:Lorg/reactivestreams/Subscription;
.line 54
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;->actual:Lorg/reactivestreams/Subscriber;
invoke-interface {v0, p0}, Lorg/reactivestreams/Subscriber;->onSubscribe(Lorg/reactivestreams/Subscription;)V
.line 56
:cond_f
return-void
.end method
.method public request(J)V
.registers 4
.param p1, "n" # J
.line 80
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber<TT;>;"
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSkipLast$SkipLastSubscriber;->s:Lorg/reactivestreams/Subscription;
invoke-interface {v0, p1, p2}, Lorg/reactivestreams/Subscription;->request(J)V
.line 81
return-void
.end method