package defpackage;

import j$.util.DesugarCollections;
import java.util.ArrayList;
import java.util.List;

/* renamed from: ᵪˊ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C3877 {

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final ArrayList f14415;

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

    public C3877(int i) {
        switch (i) {
            case 1:
                this.f14415 = new ArrayList();
                this.f14416 = 128;
                break;
            default:
                this.f14415 = new ArrayList();
                this.f14416 = 0;
                break;
        }
    }

    public C3877(ArrayList arrayList) {
        this.f14415 = arrayList;
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public synchronized boolean m8523(List list) {
        this.f14415.clear();
        int size = list.size();
        int i = this.f14416;
        if (size <= i) {
            return this.f14415.addAll(list);
        }
        return this.f14415.addAll(list.subList(0, i));
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public void m8524(InterfaceC3209 interfaceC3209) {
        if (interfaceC3209 == null) {
            ᵹˉᵞ.ˌᵜᵹᵩ("factory == null");
            return;
        }
        int i = this.f14416;
        this.f14416 = i + 1;
        this.f14415.add(i, interfaceC3209);
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public synchronized List m8525() {
        return DesugarCollections.unmodifiableList(new ArrayList(this.f14415));
    }
}
