package k.a.q;

import java.util.Collection;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.function.UnaryOperator;

/* JADX INFO: compiled from: JsonElement.kt */
/* JADX INFO: loaded from: classes.dex */
@k.a.g(with = c.class)
public final class b extends h implements List<h>, j.p0.d.i0.a {
    public static final a Companion = new a(null);
    private final List<h> b;

    /* JADX INFO: compiled from: JsonElement.kt */
    public static final class a {
        private a() {
        }

        public /* synthetic */ a(j.p0.d.j jVar) {
            this();
        }

        public final k.a.b<b> serializer() {
            return c.a;
        }
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    /* JADX WARN: Multi-variable type inference failed */
    public b(List<? extends h> list) {
        super(null);
        j.p0.d.r.f(list, "content");
        this.b = list;
    }

    @Override // java.util.List
    public /* bridge */ /* synthetic */ void add(int i2, h hVar) {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.List, java.util.Collection
    public /* bridge */ /* synthetic */ boolean add(Object obj) {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.List
    public boolean addAll(int i2, Collection<? extends h> collection) {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.List, java.util.Collection
    public boolean addAll(Collection<? extends h> collection) {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    public boolean b(h hVar) {
        j.p0.d.r.f(hVar, "element");
        return this.b.contains(hVar);
    }

    @Override // java.util.List
    /* JADX INFO: renamed from: c, reason: merged with bridge method [inline-methods] */
    public h get(int i2) {
        return this.b.get(i2);
    }

    @Override // java.util.List, java.util.Collection
    public void clear() {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.List, java.util.Collection
    public final /* bridge */ boolean contains(Object obj) {
        if (obj instanceof h) {
            return b((h) obj);
        }
        return false;
    }

    @Override // java.util.List, java.util.Collection
    public boolean containsAll(Collection<? extends Object> collection) {
        j.p0.d.r.f(collection, "elements");
        return this.b.containsAll(collection);
    }

    public int d() {
        return this.b.size();
    }

    public int e(h hVar) {
        j.p0.d.r.f(hVar, "element");
        return this.b.indexOf(hVar);
    }

    @Override // java.util.List, java.util.Collection
    public boolean equals(Object obj) {
        return j.p0.d.r.a(this.b, obj);
    }

    public int f(h hVar) {
        j.p0.d.r.f(hVar, "element");
        return this.b.lastIndexOf(hVar);
    }

    @Override // java.util.List, java.util.Collection
    public int hashCode() {
        return this.b.hashCode();
    }

    @Override // java.util.List
    public final /* bridge */ int indexOf(Object obj) {
        if (obj instanceof h) {
            return e((h) obj);
        }
        return -1;
    }

    @Override // java.util.List, java.util.Collection
    public boolean isEmpty() {
        return this.b.isEmpty();
    }

    @Override // java.util.List, java.util.Collection, java.lang.Iterable
    public Iterator<h> iterator() {
        return this.b.iterator();
    }

    @Override // java.util.List
    public final /* bridge */ int lastIndexOf(Object obj) {
        if (obj instanceof h) {
            return f((h) obj);
        }
        return -1;
    }

    @Override // java.util.List
    public ListIterator<h> listIterator() {
        return this.b.listIterator();
    }

    @Override // java.util.List
    public ListIterator<h> listIterator(int i2) {
        return this.b.listIterator(i2);
    }

    @Override // java.util.List
    public /* bridge */ /* synthetic */ h remove(int i2) {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.List, java.util.Collection
    public boolean remove(Object obj) {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.List, java.util.Collection
    public boolean removeAll(Collection<? extends Object> collection) {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.List
    public void replaceAll(UnaryOperator<h> unaryOperator) {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.List, java.util.Collection
    public boolean retainAll(Collection<? extends Object> collection) {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.List
    public /* bridge */ /* synthetic */ h set(int i2, h hVar) {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.List, java.util.Collection
    public final /* bridge */ int size() {
        return d();
    }

    @Override // java.util.List
    public void sort(Comparator<? super h> comparator) {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.List
    public List<h> subList(int i2, int i3) {
        return this.b.subList(i2, i3);
    }

    @Override // java.util.List, java.util.Collection
    public Object[] toArray() {
        return j.p0.d.i.a(this);
    }

    @Override // java.util.List, java.util.Collection
    public <T> T[] toArray(T[] tArr) {
        j.p0.d.r.f(tArr, "array");
        return (T[]) j.p0.d.i.b(this, tArr);
    }

    public String toString() {
        return j.k0.w.C(this.b, ",", "[", "]", 0, null, null, 56, null);
    }
}
