package androidx.leanback.widget;

import V.C0629x;
import n.C2580g;

/* JADX INFO: renamed from: androidx.leanback.widget.j, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public abstract class AbstractC1078j {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public C0.B f11983b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public boolean f11984c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public int f11985d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public int f11986e;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public C2580g[] f11989h;

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final Object[] f11982a = new Object[1];

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public int f11987f = -1;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public int f11988g = -1;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public int f11990i = -1;

    public final boolean a() {
        return b(this.f11984c ? Integer.MAX_VALUE : Integer.MIN_VALUE, true);
    }

    public abstract boolean b(int i6, boolean z6);

    public final boolean c(int i6) {
        return this.f11988g >= 0 && (!this.f11984c ? f(false, null) < i6 - this.f11985d : h(true, null) > i6 + this.f11985d);
    }

    public final boolean d(int i6) {
        return this.f11988g >= 0 && (!this.f11984c ? h(true, null) > i6 + this.f11985d : f(false, null) < i6 - this.f11985d);
    }

    public final int f(boolean z6, int[] iArr) {
        return g(iArr, this.f11984c ? this.f11987f : this.f11988g, z6);
    }

    public abstract int g(int[] iArr, int i6, boolean z6);

    public final int h(boolean z6, int[] iArr) {
        return i(iArr, this.f11984c ? this.f11988g : this.f11987f, z6);
    }

    public abstract int i(int[] iArr, int i6, boolean z6);

    public abstract C2580g[] j(int i6, int i7);

    public abstract C1077i k(int i6);

    public void l(int i6) {
        int i7;
        if (i6 >= 0 && (i7 = this.f11988g) >= 0) {
            if (i7 >= i6) {
                this.f11988g = i6 - 1;
            }
            if (this.f11988g < this.f11987f) {
                this.f11988g = -1;
                this.f11987f = -1;
            }
            if (this.f11987f < 0) {
                this.f11990i = i6;
            }
        }
    }

    public abstract boolean m(int i6, boolean z6);

    public final void n(int i6) {
        if (i6 <= 0) {
            throw new IllegalArgumentException();
        }
        if (this.f11986e == i6) {
            return;
        }
        this.f11986e = i6;
        this.f11989h = new C2580g[i6];
        for (int i7 = 0; i7 < this.f11986e; i7++) {
            this.f11989h[i7] = new C2580g();
        }
    }

    public void e(int i6, int i7, C0629x c0629x) {
    }
}
