42 lines
1.1 KiB
Java
42 lines
1.1 KiB
Java
package j0.r;
|
|
|
|
import java.util.concurrent.atomic.AtomicReference;
|
|
import rx.Subscription;
|
|
import rx.functions.Action0;
|
|
/* compiled from: BooleanSubscription */
|
|
public final class a implements Subscription {
|
|
public static final Action0 i = new C0337a();
|
|
public final AtomicReference<Action0> j;
|
|
|
|
/* compiled from: BooleanSubscription */
|
|
/* renamed from: j0.r.a$a reason: collision with other inner class name */
|
|
public static class C0337a implements Action0 {
|
|
@Override // rx.functions.Action0
|
|
public void call() {
|
|
}
|
|
}
|
|
|
|
public a() {
|
|
this.j = new AtomicReference<>();
|
|
}
|
|
|
|
public a(Action0 action0) {
|
|
this.j = new AtomicReference<>(action0);
|
|
}
|
|
|
|
@Override // rx.Subscription
|
|
public boolean isUnsubscribed() {
|
|
return this.j.get() == i;
|
|
}
|
|
|
|
@Override // rx.Subscription
|
|
public void unsubscribe() {
|
|
Action0 andSet;
|
|
Action0 action0 = this.j.get();
|
|
Action0 action02 = i;
|
|
if (action0 != action02 && (andSet = this.j.getAndSet(action02)) != null && andSet != action02) {
|
|
andSet.call();
|
|
}
|
|
}
|
|
}
|