mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-12-06 12:29:32 +01:00
89 lines
2.7 KiB
Java
89 lines
2.7 KiB
Java
package io.reactivex.rxjava3.internal.disposables;
|
|
|
|
import io.reactivex.rxjava3.annotations.Nullable;
|
|
import io.reactivex.rxjava3.core.CompletableObserver;
|
|
import io.reactivex.rxjava3.core.MaybeObserver;
|
|
import io.reactivex.rxjava3.core.Observer;
|
|
import io.reactivex.rxjava3.core.SingleObserver;
|
|
import io.reactivex.rxjava3.operators.QueueDisposable;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes10.dex */
|
|
public enum EmptyDisposable implements QueueDisposable<Object> {
|
|
INSTANCE,
|
|
NEVER;
|
|
|
|
public static void complete(Observer<?> observer) {
|
|
observer.onSubscribe(INSTANCE);
|
|
observer.onComplete();
|
|
}
|
|
|
|
public static void error(Throwable th, Observer<?> observer) {
|
|
observer.onSubscribe(INSTANCE);
|
|
observer.onError(th);
|
|
}
|
|
|
|
@Override // io.reactivex.rxjava3.disposables.Disposable
|
|
public boolean isDisposed() {
|
|
return this == INSTANCE;
|
|
}
|
|
|
|
@Override // io.reactivex.rxjava3.operators.SimpleQueue
|
|
public boolean isEmpty() {
|
|
return true;
|
|
}
|
|
|
|
@Override // io.reactivex.rxjava3.operators.SimpleQueue
|
|
public boolean offer(Object obj) {
|
|
throw new UnsupportedOperationException("Should not be called!");
|
|
}
|
|
|
|
@Override // io.reactivex.rxjava3.operators.SimpleQueue
|
|
@Nullable
|
|
public Object poll() {
|
|
return null;
|
|
}
|
|
|
|
@Override // io.reactivex.rxjava3.operators.QueueFuseable
|
|
public int requestFusion(int i) {
|
|
return i & 2;
|
|
}
|
|
|
|
@Override // io.reactivex.rxjava3.operators.SimpleQueue
|
|
public boolean offer(Object obj, Object obj2) {
|
|
throw new UnsupportedOperationException("Should not be called!");
|
|
}
|
|
|
|
public static void complete(MaybeObserver<?> maybeObserver) {
|
|
maybeObserver.onSubscribe(INSTANCE);
|
|
maybeObserver.onComplete();
|
|
}
|
|
|
|
public static void error(Throwable th, CompletableObserver completableObserver) {
|
|
completableObserver.onSubscribe(INSTANCE);
|
|
completableObserver.onError(th);
|
|
}
|
|
|
|
public static void complete(CompletableObserver completableObserver) {
|
|
completableObserver.onSubscribe(INSTANCE);
|
|
completableObserver.onComplete();
|
|
}
|
|
|
|
public static void error(Throwable th, SingleObserver<?> singleObserver) {
|
|
singleObserver.onSubscribe(INSTANCE);
|
|
singleObserver.onError(th);
|
|
}
|
|
|
|
public static void error(Throwable th, MaybeObserver<?> maybeObserver) {
|
|
maybeObserver.onSubscribe(INSTANCE);
|
|
maybeObserver.onError(th);
|
|
}
|
|
|
|
@Override // io.reactivex.rxjava3.operators.SimpleQueue
|
|
public void clear() {
|
|
}
|
|
|
|
@Override // io.reactivex.rxjava3.disposables.Disposable
|
|
public void dispose() {
|
|
}
|
|
}
|