package X6FRs_4.X6FRs_4.KQgRr5e_0;
/* compiled from: Pools.java */
/* loaded from: classes.dex */
public class FSaI4_7<T> implements IMuAHx_6<T> {
    public int KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final Object[] f1106KQgRr5e_0;

    public FSaI4_7(int i) {
        if (i > 0) {
            this.f1106KQgRr5e_0 = new Object[i];
            return;
        }
        throw new IllegalArgumentException("The max pool size must be > 0");
    }

    @Override // X6FRs_4.X6FRs_4.KQgRr5e_0.IMuAHx_6
    public T KQgRr5e_0() {
        int i = this.KQgRr5e_0;
        if (i > 0) {
            int i2 = i - 1;
            Object[] objArr = this.f1106KQgRr5e_0;
            T t = (T) objArr[i2];
            objArr[i2] = null;
            this.KQgRr5e_0 = i - 1;
            return t;
        }
        return null;
    }

    @Override // X6FRs_4.X6FRs_4.KQgRr5e_0.IMuAHx_6
    public boolean KQgRr5e_0(T t) {
        int i = this.KQgRr5e_0;
        Object[] objArr = this.f1106KQgRr5e_0;
        if (i < objArr.length) {
            objArr[i] = t;
            this.KQgRr5e_0 = i + 1;
            return true;
        }
        return false;
    }

    @Override // X6FRs_4.X6FRs_4.KQgRr5e_0.IMuAHx_6
    public void KQgRr5e_0(T[] tArr, int i) {
        if (i > tArr.length) {
            i = tArr.length;
        }
        for (int i2 = 0; i2 < i; i2++) {
            T t = tArr[i2];
            int i3 = this.KQgRr5e_0;
            Object[] objArr = this.f1106KQgRr5e_0;
            if (i3 < objArr.length) {
                objArr[i3] = t;
                this.KQgRr5e_0 = i3 + 1;
            }
        }
    }
}
