what-the-bank/sources/o/fSH.java

29 lines
681 B
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicReference;
/* loaded from: classes6.dex */
abstract class fSH<T> extends AtomicReference<T> implements fSJ {
protected abstract void a(T t);
/* JADX INFO: Access modifiers changed from: package-private */
public fSH(T t) {
super(Objects.requireNonNull(t, "value is null"));
}
@Override // o.fSJ
public final void dispose() {
T andSet;
if (get() == null || (andSet = getAndSet(null)) == null) {
return;
}
a(andSet);
}
@Override // o.fSJ
public final boolean isDisposed() {
return get() == null;
}
}