package com.bytedance.ies.nle.editor_jni;

import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import java.util.AbstractList;
import java.util.RandomAccess;

public class VecFloat extends AbstractList<Float> implements RandomAccess {
    public transient long LIZ;
    public transient boolean LIZIZ;

    static {
        Covode.recordClassIndex(29923);
    }

    public void finalize() {
        LIZ();
    }

    public VecFloat() {
        this(NLEEditorJniJNI.new_VecFloat__SWIG_0());
        MethodCollector.i(18765);
        MethodCollector.o(18765);
    }

    public void clear() {
        MethodCollector.i(18768);
        NLEEditorJniJNI.VecFloat_clear(this.LIZ, this);
        MethodCollector.o(18768);
    }

    public boolean isEmpty() {
        MethodCollector.i(18767);
        boolean VecFloat_isEmpty = NLEEditorJniJNI.VecFloat_isEmpty(this.LIZ, this);
        MethodCollector.o(18767);
        return VecFloat_isEmpty;
    }

    public int size() {
        MethodCollector.i(18763);
        int VecFloat_doSize = NLEEditorJniJNI.VecFloat_doSize(this.LIZ, this);
        MethodCollector.o(18763);
        return VecFloat_doSize;
    }

    private synchronized void LIZ() {
        MethodCollector.i(18752);
        long j = this.LIZ;
        if (j != 0) {
            if (this.LIZIZ) {
                this.LIZIZ = false;
                NLEEditorJniJNI.delete_VecFloat(j);
            }
            this.LIZ = 0;
        }
        MethodCollector.o(18752);
    }

    private void LIZ(float f) {
        MethodCollector.i(18769);
        NLEEditorJniJNI.VecFloat_doAdd__SWIG_0(this.LIZ, this, f);
        MethodCollector.o(18769);
    }

    public VecFloat(long j) {
        this.LIZIZ = true;
        this.LIZ = j;
    }

    /* access modifiers changed from: private */
    /* renamed from: LIZ */
    public boolean add(Float f) {
        this.modCount++;
        LIZ(f.floatValue());
        return true;
    }

    public /* synthetic */ Object get(int i) {
        MethodCollector.i(18773);
        Float valueOf = Float.valueOf(NLEEditorJniJNI.VecFloat_doGet(this.LIZ, this, i));
        MethodCollector.o(18773);
        return valueOf;
    }

    public /* synthetic */ Object remove(int i) {
        MethodCollector.i(18770);
        this.modCount++;
        Float valueOf = Float.valueOf(NLEEditorJniJNI.VecFloat_doRemove(this.LIZ, this, i));
        MethodCollector.o(18770);
        return valueOf;
    }

    public VecFloat(float[] fArr) {
        this();
        MethodCollector.i(18755);
        NLEEditorJniJNI.VecFloat_reserve(this.LIZ, this, (long) fArr.length);
        for (float valueOf : fArr) {
            add(Float.valueOf(valueOf));
        }
        MethodCollector.o(18755);
    }

    public /* synthetic */ void add(int i, Object obj) {
        MethodCollector.i(18771);
        this.modCount++;
        NLEEditorJniJNI.VecFloat_doAdd__SWIG_1(this.LIZ, this, i, ((Float) obj).floatValue());
        MethodCollector.o(18771);
    }

    public void removeRange(int i, int i2) {
        MethodCollector.i(18760);
        this.modCount++;
        NLEEditorJniJNI.VecFloat_doRemoveRange(this.LIZ, this, i, i2);
        MethodCollector.o(18760);
    }

    public /* synthetic */ Object set(int i, Object obj) {
        MethodCollector.i(18772);
        Float valueOf = Float.valueOf(NLEEditorJniJNI.VecFloat_doSet(this.LIZ, this, i, ((Float) obj).floatValue()));
        MethodCollector.o(18772);
        return valueOf;
    }
}
