package io.reactivex.disposables;

import java.util.concurrent.atomic.AtomicReference;
import 㴹.K.Ԕ.ῲ.C2456;
import 㴹.K.㑃.AbstractC2514;

public abstract class ReferenceDisposable<T> extends AtomicReference<T> implements AbstractC2514 {
    public static final long serialVersionUID = 6537757548749041217L;

    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    public ReferenceDisposable(T t) {
        super(t);
        C2456.m6500(t, "value is null");
    }

    /* JADX DEBUG: Multi-variable search result rejected for r1v0, resolved type: io.reactivex.disposables.ReferenceDisposable<T> */
    /* JADX WARN: Multi-variable type inference failed */
    @Override // 㴹.K.㑃.AbstractC2514
    public final void dispose() {
        Object andSet;
        if (get() != null && (andSet = getAndSet(null)) != null) {
            onDisposed(andSet);
        }
    }

    @Override // 㴹.K.㑃.AbstractC2514
    public final boolean isDisposed() {
        return get() == null;
    }

    public abstract void onDisposed(T t);
}
