tmap/smali_classes5/io/reactivex/internal/operators/observable/ObservableScalarXMap$ScalarDisposable.smali
2022-06-10 21:38:30 +09:00

300 lines
6.2 KiB
Smali

.class public final Lio/reactivex/internal/operators/observable/ObservableScalarXMap$ScalarDisposable;
.super Ljava/util/concurrent/atomic/AtomicInteger;
.source "ObservableScalarXMap.java"
# interfaces
.implements Lrh/j;
.implements Ljava/lang/Runnable;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lio/reactivex/internal/operators/observable/ObservableScalarXMap;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "ScalarDisposable"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/util/concurrent/atomic/AtomicInteger;",
"Lrh/j<",
"TT;>;",
"Ljava/lang/Runnable;"
}
.end annotation
# static fields
.field public static final FUSED:I = 0x1
.field public static final ON_COMPLETE:I = 0x3
.field public static final ON_NEXT:I = 0x2
.field public static final START:I = 0x0
.field private static final serialVersionUID:J = 0x35dc0e519322c4a3L
# instance fields
.field public final observer:Lkh/g0;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lkh/g0<",
"-TT;>;"
}
.end annotation
.end field
.field public final value:Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"TT;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Lkh/g0;Ljava/lang/Object;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lkh/g0<",
"-TT;>;TT;)V"
}
.end annotation
.line 1
invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicInteger;-><init>()V
.line 2
iput-object p1, p0, Lio/reactivex/internal/operators/observable/ObservableScalarXMap$ScalarDisposable;->observer:Lkh/g0;
.line 3
iput-object p2, p0, Lio/reactivex/internal/operators/observable/ObservableScalarXMap$ScalarDisposable;->value:Ljava/lang/Object;
return-void
.end method
# virtual methods
.method public clear()V
.locals 1
const/4 v0, 0x3
.line 1
invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicInteger;->lazySet(I)V
return-void
.end method
.method public dispose()V
.locals 1
const/4 v0, 0x3
.line 1
invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicInteger;->set(I)V
return-void
.end method
.method public isDisposed()Z
.locals 2
.line 1
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
move-result v0
const/4 v1, 0x3
if-ne v0, v1, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public isEmpty()Z
.locals 2
.line 1
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
move-result v0
const/4 v1, 0x1
if-eq v0, v1, :cond_0
goto :goto_0
:cond_0
const/4 v1, 0x0
:goto_0
return v1
.end method
.method public offer(Ljava/lang/Object;)Z
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)Z"
}
.end annotation
.line 1
new-instance p1, Ljava/lang/UnsupportedOperationException;
const-string v0, "Should not be called!"
invoke-direct {p1, v0}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public offer(Ljava/lang/Object;Ljava/lang/Object;)Z
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;TT;)Z"
}
.end annotation
.line 2
new-instance p1, Ljava/lang/UnsupportedOperationException;
const-string p2, "Should not be called!"
invoke-direct {p1, p2}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public poll()Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.annotation build Lio/reactivex/annotations/Nullable;
.end annotation
.line 1
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
move-result v0
const/4 v1, 0x1
if-ne v0, v1, :cond_0
const/4 v0, 0x3
.line 2
invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicInteger;->lazySet(I)V
.line 3
iget-object v0, p0, Lio/reactivex/internal/operators/observable/ObservableScalarXMap$ScalarDisposable;->value:Ljava/lang/Object;
return-object v0
:cond_0
const/4 v0, 0x0
return-object v0
.end method
.method public requestFusion(I)I
.locals 1
const/4 v0, 0x1
and-int/2addr p1, v0
if-eqz p1, :cond_0
.line 1
invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicInteger;->lazySet(I)V
return v0
:cond_0
const/4 p1, 0x0
return p1
.end method
.method public run()V
.locals 3
.line 1
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
move-result v0
if-nez v0, :cond_0
const/4 v0, 0x0
const/4 v1, 0x2
invoke-virtual {p0, v0, v1}, Ljava/util/concurrent/atomic/AtomicInteger;->compareAndSet(II)Z
move-result v0
if-eqz v0, :cond_0
.line 2
iget-object v0, p0, Lio/reactivex/internal/operators/observable/ObservableScalarXMap$ScalarDisposable;->observer:Lkh/g0;
iget-object v2, p0, Lio/reactivex/internal/operators/observable/ObservableScalarXMap$ScalarDisposable;->value:Ljava/lang/Object;
invoke-interface {v0, v2}, Lkh/g0;->onNext(Ljava/lang/Object;)V
.line 3
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
move-result v0
if-ne v0, v1, :cond_0
const/4 v0, 0x3
.line 4
invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicInteger;->lazySet(I)V
.line 5
iget-object v0, p0, Lio/reactivex/internal/operators/observable/ObservableScalarXMap$ScalarDisposable;->observer:Lkh/g0;
invoke-interface {v0}, Lkh/g0;->onComplete()V
:cond_0
return-void
.end method