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

65 lines
1.9 KiB
Java

package o;
import java.io.Serializable;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes6.dex */
public final class fZY<T> implements InterfaceC13393fZL<T>, Serializable {
private static final AtomicReferenceFieldUpdater<fZY<?>, Object> a;
private volatile Object b;
private final Object c;
private volatile InterfaceC14890gbN<? extends T> d;
public fZY(InterfaceC14890gbN<? extends T> interfaceC14890gbN) {
C14957gcv.e(interfaceC14890gbN, "");
this.d = interfaceC14890gbN;
this.b = C14867gah.b;
this.c = C14867gah.b;
}
@Override // o.InterfaceC13393fZL
public final T e() {
T t = (T) this.b;
if (t != C14867gah.b) {
return t;
}
InterfaceC14890gbN<? extends T> interfaceC14890gbN = this.d;
if (interfaceC14890gbN != null) {
T invoke = interfaceC14890gbN.invoke();
AtomicReferenceFieldUpdater<fZY<?>, Object> atomicReferenceFieldUpdater = a;
C14867gah c14867gah = C14867gah.b;
while (!atomicReferenceFieldUpdater.compareAndSet(this, c14867gah, invoke)) {
if (atomicReferenceFieldUpdater.get(this) != c14867gah) {
}
}
this.d = null;
return invoke;
}
return (T) this.b;
}
public final String toString() {
return this.b != C14867gah.b ? String.valueOf(e()) : "Lazy value not initialized yet.";
}
private final Object writeReplace() {
return new fZM(e());
}
/* loaded from: classes6.dex */
public static final class IeS {
private IeS() {
}
public /* synthetic */ IeS(byte b) {
this();
}
}
static {
new IeS((byte) 0);
a = AtomicReferenceFieldUpdater.newUpdater(fZY.class, Object.class, "b");
}
}