package kotlin.reflect.w.internal.y0.i;

import java.io.IOException;
import java.util.Iterator;
import java.util.Map;

/* JADX INFO: loaded from: classes2.dex */
public class k extends l {

    public static class b<K> implements Map.Entry<K, Object> {

        /* JADX INFO: renamed from: f, reason: collision with root package name */
        public Map.Entry<K, k> f8276f;

        public b(Map.Entry entry, a aVar) {
            this.f8276f = entry;
        }

        @Override // java.util.Map.Entry
        public K getKey() {
            return this.f8276f.getKey();
        }

        @Override // java.util.Map.Entry
        public Object getValue() {
            k value = this.f8276f.getValue();
            if (value == null) {
                return null;
            }
            return value.a();
        }

        @Override // java.util.Map.Entry
        public Object setValue(Object obj) {
            if (!(obj instanceof p)) {
                throw new IllegalArgumentException("LazyField now only used for MessageSet, and the value of MessageSet must be an instance of MessageLite");
            }
            k value = this.f8276f.getValue();
            p pVar = value.f8278b;
            value.f8278b = (p) obj;
            value.a = true;
            return pVar;
        }
    }

    public static class c<K> implements Iterator<Map.Entry<K, Object>> {

        /* JADX INFO: renamed from: f, reason: collision with root package name */
        public Iterator<Map.Entry<K, Object>> f8277f;

        public c(Iterator<Map.Entry<K, Object>> it) {
            this.f8277f = it;
        }

        @Override // java.util.Iterator
        public boolean hasNext() {
            return this.f8277f.hasNext();
        }

        @Override // java.util.Iterator
        public Object next() {
            Map.Entry<K, Object> next = this.f8277f.next();
            return next.getValue() instanceof k ? new b(next, null) : next;
        }

        @Override // java.util.Iterator
        public void remove() {
            this.f8277f.remove();
        }
    }

    public p a() {
        if (this.f8278b == null) {
            synchronized (this) {
                if (this.f8278b == null) {
                    try {
                        this.f8278b = null;
                    } catch (IOException unused) {
                    }
                }
            }
        }
        return this.f8278b;
    }

    public boolean equals(Object obj) {
        return a().equals(obj);
    }

    public int hashCode() {
        return a().hashCode();
    }

    public String toString() {
        return a().toString();
    }
}
