package defpackage;

import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;

/* renamed from: ˇˑ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public abstract class AbstractC0946 extends AbstractC3435 {

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public boolean f4253;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public Object[] f4254;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public int f4255;

    public AbstractC0946(int i) {
        ˏᵭᵔᵬ.ᵻᵢﹳᵰ(i, "initialCapacity");
        this.f4254 = new Object[i];
        this.f4255 = 0;
    }

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public final void m3196(int i) {
        Object[] objArr = this.f4254;
        int iM7813 = AbstractC3435.m7813(objArr.length, this.f4255 + i);
        if (iM7813 > objArr.length || this.f4253) {
            this.f4254 = Arrays.copyOf(this.f4254, iM7813);
            this.f4253 = false;
        }
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final void m3197(Object obj) {
        obj.getClass();
        m3196(1);
        Object[] objArr = this.f4254;
        int i = this.f4255;
        this.f4255 = i + 1;
        objArr[i] = obj;
    }

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public final void m3198(Iterable iterable) {
        if (iterable instanceof Collection) {
            Collection collection = (Collection) iterable;
            m3196(collection.size());
            if (collection instanceof AbstractC3821) {
                this.f4255 = ((AbstractC3821) collection).mo4462(this.f4255, this.f4254);
                return;
            }
        }
        Iterator it = iterable.iterator();
        while (it.hasNext()) {
            mo4394(it.next());
        }
    }
}
