package p138.p176.p177.p242.p258.p263;

import java.util.AbstractList;
import java.util.Arrays;
import java.util.Collection;
import java.util.RandomAccess;

/* JADX INFO: renamed from: ދ.ހ.֏.ހ.ރ.ނ.ʱ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C4417 extends AbstractC4440<Float> implements InterfaceC4518<Float>, InterfaceC4654, RandomAccess {

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public float[] f13717;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public int f13718;

    static {
        new C4417(new float[0], 0).f13794 = false;
    }

    public C4417() {
        this.f13717 = new float[10];
        this.f13718 = 0;
    }

    public C4417(float[] fArr, int i) {
        this.f13717 = fArr;
        this.f13718 = i;
    }

    @Override // java.util.AbstractList, java.util.List
    public final /* synthetic */ void add(int i, Object obj) {
        int i2;
        float fFloatValue = ((Float) obj).floatValue();
        m7401();
        if (i < 0 || i > (i2 = this.f13718)) {
            throw new IndexOutOfBoundsException(m7350(i));
        }
        float[] fArr = this.f13717;
        if (i2 < fArr.length) {
            System.arraycopy(fArr, i, fArr, i + 1, i2 - i);
        } else {
            float[] fArr2 = new float[((i2 * 3) / 2) + 1];
            System.arraycopy(fArr, 0, fArr2, 0, i);
            System.arraycopy(this.f13717, i, fArr2, i + 1, this.f13718 - i);
            this.f13717 = fArr2;
        }
        this.f13717[i] = fFloatValue;
        this.f13718++;
        ((AbstractList) this).modCount++;
    }

    @Override // p138.p176.p177.p242.p258.p263.AbstractC4440, java.util.AbstractList, java.util.AbstractCollection, java.util.Collection, java.util.List
    public final /* synthetic */ boolean add(Object obj) {
        m7348(((Float) obj).floatValue());
        return true;
    }

    @Override // p138.p176.p177.p242.p258.p263.AbstractC4440, java.util.AbstractCollection, java.util.Collection, java.util.List
    public final boolean addAll(Collection<? extends Float> collection) {
        m7401();
        C4545.m7591(collection);
        if (!(collection instanceof C4417)) {
            return super.addAll(collection);
        }
        C4417 c4417 = (C4417) collection;
        int i = c4417.f13718;
        if (i == 0) {
            return false;
        }
        int i2 = this.f13718;
        if (Integer.MAX_VALUE - i2 < i) {
            throw new OutOfMemoryError();
        }
        int i3 = i2 + i;
        float[] fArr = this.f13717;
        if (i3 > fArr.length) {
            this.f13717 = Arrays.copyOf(fArr, i3);
        }
        System.arraycopy(c4417.f13717, 0, this.f13717, this.f13718, c4417.f13718);
        this.f13718 = i3;
        ((AbstractList) this).modCount++;
        return true;
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.util.List
    public final boolean contains(Object obj) {
        return indexOf(obj) != -1;
    }

    @Override // p138.p176.p177.p242.p258.p263.AbstractC4440, java.util.AbstractList, java.util.Collection, java.util.List
    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof C4417)) {
            return super.equals(obj);
        }
        C4417 c4417 = (C4417) obj;
        if (this.f13718 != c4417.f13718) {
            return false;
        }
        float[] fArr = c4417.f13717;
        for (int i = 0; i < this.f13718; i++) {
            if (Float.floatToIntBits(this.f13717[i]) != Float.floatToIntBits(fArr[i])) {
                return false;
            }
        }
        return true;
    }

    @Override // java.util.AbstractList, java.util.List
    public final /* synthetic */ Object get(int i) {
        m7349(i);
        return Float.valueOf(this.f13717[i]);
    }

    @Override // p138.p176.p177.p242.p258.p263.AbstractC4440, java.util.AbstractList, java.util.Collection, java.util.List
    public final int hashCode() {
        int iFloatToIntBits = 1;
        for (int i = 0; i < this.f13718; i++) {
            iFloatToIntBits = (iFloatToIntBits * 31) + Float.floatToIntBits(this.f13717[i]);
        }
        return iFloatToIntBits;
    }

    @Override // java.util.AbstractList, java.util.List
    public final int indexOf(Object obj) {
        if (!(obj instanceof Float)) {
            return -1;
        }
        float fFloatValue = ((Float) obj).floatValue();
        int i = this.f13718;
        for (int i2 = 0; i2 < i; i2++) {
            if (this.f13717[i2] == fFloatValue) {
                return i2;
            }
        }
        return -1;
    }

    @Override // java.util.AbstractList, java.util.List
    public final /* synthetic */ Object remove(int i) {
        m7401();
        m7349(i);
        float[] fArr = this.f13717;
        float f = fArr[i];
        if (i < this.f13718 - 1) {
            System.arraycopy(fArr, i + 1, fArr, i, (r2 - i) - 1);
        }
        this.f13718--;
        ((AbstractList) this).modCount++;
        return Float.valueOf(f);
    }

    @Override // p138.p176.p177.p242.p258.p263.AbstractC4440, java.util.AbstractCollection, java.util.Collection, java.util.List
    public final boolean remove(Object obj) {
        m7401();
        for (int i = 0; i < this.f13718; i++) {
            if (obj.equals(Float.valueOf(this.f13717[i]))) {
                float[] fArr = this.f13717;
                System.arraycopy(fArr, i + 1, fArr, i, (this.f13718 - i) - 1);
                this.f13718--;
                ((AbstractList) this).modCount++;
                return true;
            }
        }
        return false;
    }

    @Override // java.util.AbstractList
    public final void removeRange(int i, int i2) {
        m7401();
        if (i2 < i) {
            throw new IndexOutOfBoundsException("toIndex < fromIndex");
        }
        float[] fArr = this.f13717;
        System.arraycopy(fArr, i2, fArr, i, this.f13718 - i2);
        this.f13718 -= i2 - i;
        ((AbstractList) this).modCount++;
    }

    @Override // java.util.AbstractList, java.util.List
    public final /* synthetic */ Object set(int i, Object obj) {
        float fFloatValue = ((Float) obj).floatValue();
        m7401();
        m7349(i);
        float[] fArr = this.f13717;
        float f = fArr[i];
        fArr[i] = fFloatValue;
        return Float.valueOf(f);
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.util.List
    public final int size() {
        return this.f13718;
    }

    @Override // p138.p176.p177.p242.p258.p263.InterfaceC4518
    /* JADX INFO: renamed from: ֏ */
    public final /* synthetic */ InterfaceC4518<Float> mo7302(int i) {
        if (i >= this.f13718) {
            return new C4417(Arrays.copyOf(this.f13717, i), this.f13718);
        }
        throw new IllegalArgumentException();
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m7348(float f) {
        m7401();
        int i = this.f13718;
        float[] fArr = this.f13717;
        if (i == fArr.length) {
            float[] fArr2 = new float[((i * 3) / 2) + 1];
            System.arraycopy(fArr, 0, fArr2, 0, i);
            this.f13717 = fArr2;
        }
        float[] fArr3 = this.f13717;
        int i2 = this.f13718;
        this.f13718 = i2 + 1;
        fArr3[i2] = f;
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final void m7349(int i) {
        if (i < 0 || i >= this.f13718) {
            throw new IndexOutOfBoundsException(m7350(i));
        }
    }

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public final String m7350(int i) {
        int i2 = this.f13718;
        StringBuilder sb = new StringBuilder(35);
        sb.append("Index:");
        sb.append(i);
        sb.append(", Size:");
        sb.append(i2);
        return sb.toString();
    }
}
