package o;

import android.os.Build;
import android.view.View;
import java.nio.ByteBuffer;
import java.util.ConcurrentModificationException;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.vN, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public abstract class AbstractC2708vN {
    public int l;
    public int m;
    public int n;

    /* renamed from: o, reason: collision with root package name */
    public Object f756o;

    public AbstractC2708vN() {
        if (BP.m == null) {
            BP.m = new BP(24);
        }
    }

    public int a(int i) {
        if (i < this.n) {
            return ((ByteBuffer) this.f756o).getShort(this.m + i);
        }
        return 0;
    }

    public void b() {
        if (((C2803wN) this.f756o).s != this.n) {
            throw new ConcurrentModificationException();
        }
    }

    public abstract Object c(View view);

    public abstract void d(View view, Object obj);

    public void e() {
        while (true) {
            int i = this.l;
            C2803wN c2803wN = (C2803wN) this.f756o;
            if (i >= c2803wN.q || c2803wN.n[i] >= 0) {
                return;
            } else {
                this.l = i + 1;
            }
        }
    }

    public void f(View view, Object obj) {
        Object tag;
        if (Build.VERSION.SDK_INT >= this.m) {
            d(view, obj);
            return;
        }
        if (Build.VERSION.SDK_INT >= this.m) {
            tag = c(view);
        } else {
            tag = view.getTag(this.l);
            if (!((Class) this.f756o).isInstance(tag)) {
                tag = null;
            }
        }
        if (g(tag, obj)) {
            View.AccessibilityDelegate accessibilityDelegateD = Oj0.d(view);
            C2011o0 c2011o0 = accessibilityDelegateD == null ? null : accessibilityDelegateD instanceof C1916n0 ? ((C1916n0) accessibilityDelegateD).a : new C2011o0(accessibilityDelegateD);
            if (c2011o0 == null) {
                c2011o0 = new C2011o0();
            }
            Oj0.m(view, c2011o0);
            view.setTag(this.l, obj);
            Oj0.h(view, this.n);
        }
    }

    public abstract boolean g(Object obj, Object obj2);

    public boolean hasNext() {
        return this.l < ((C2803wN) this.f756o).q;
    }

    public void remove() {
        C2803wN c2803wN = (C2803wN) this.f756o;
        b();
        if (this.m == -1) {
            throw new IllegalStateException("Call next() before removing element from the iterator.");
        }
        c2803wN.c();
        c2803wN.i(this.m);
        this.m = -1;
        this.n = c2803wN.s;
    }
}
