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 VecNLEMVExternalAlgorithmResultSPtr extends AbstractList<NLEMVExternalAlgorithmResult> implements RandomAccess {
    public transient boolean LIZ;
    public transient long LIZIZ;

    static {
        Covode.recordClassIndex(29936);
    }

    public void finalize() {
        LIZ();
    }

    public VecNLEMVExternalAlgorithmResultSPtr() {
        this(NLEEditorJniJNI.new_VecNLEMVExternalAlgorithmResultSPtr__SWIG_0());
        MethodCollector.i(19021);
        MethodCollector.o(19021);
    }

    public void clear() {
        MethodCollector.i(19023);
        NLEEditorJniJNI.VecNLEMVExternalAlgorithmResultSPtr_clear(this.LIZIZ, this);
        MethodCollector.o(19023);
    }

    public boolean isEmpty() {
        MethodCollector.i(19022);
        boolean VecNLEMVExternalAlgorithmResultSPtr_isEmpty = NLEEditorJniJNI.VecNLEMVExternalAlgorithmResultSPtr_isEmpty(this.LIZIZ, this);
        MethodCollector.o(19022);
        return VecNLEMVExternalAlgorithmResultSPtr_isEmpty;
    }

    public int size() {
        MethodCollector.i(19020);
        int VecNLEMVExternalAlgorithmResultSPtr_doSize = NLEEditorJniJNI.VecNLEMVExternalAlgorithmResultSPtr_doSize(this.LIZIZ, this);
        MethodCollector.o(19020);
        return VecNLEMVExternalAlgorithmResultSPtr_doSize;
    }

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

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

    public /* synthetic */ Object get(int i) {
        MethodCollector.i(19030);
        long VecNLEMVExternalAlgorithmResultSPtr_doGet = NLEEditorJniJNI.VecNLEMVExternalAlgorithmResultSPtr_doGet(this.LIZIZ, this, i);
        if (VecNLEMVExternalAlgorithmResultSPtr_doGet == 0) {
            MethodCollector.o(19030);
            return null;
        }
        NLEMVExternalAlgorithmResult nLEMVExternalAlgorithmResult = new NLEMVExternalAlgorithmResult(VecNLEMVExternalAlgorithmResultSPtr_doGet);
        MethodCollector.o(19030);
        return nLEMVExternalAlgorithmResult;
    }

    public /* synthetic */ boolean add(Object obj) {
        MethodCollector.i(19032);
        NLEMVExternalAlgorithmResult nLEMVExternalAlgorithmResult = (NLEMVExternalAlgorithmResult) obj;
        this.modCount++;
        NLEEditorJniJNI.VecNLEMVExternalAlgorithmResultSPtr_doAdd__SWIG_0(this.LIZIZ, this, NLEMVExternalAlgorithmResult.LIZ(nLEMVExternalAlgorithmResult), nLEMVExternalAlgorithmResult);
        MethodCollector.o(19032);
        return true;
    }

    public /* synthetic */ Object remove(int i) {
        MethodCollector.i(19024);
        this.modCount++;
        long VecNLEMVExternalAlgorithmResultSPtr_doRemove = NLEEditorJniJNI.VecNLEMVExternalAlgorithmResultSPtr_doRemove(this.LIZIZ, this, i);
        if (VecNLEMVExternalAlgorithmResultSPtr_doRemove == 0) {
            MethodCollector.o(19024);
            return null;
        }
        NLEMVExternalAlgorithmResult nLEMVExternalAlgorithmResult = new NLEMVExternalAlgorithmResult(VecNLEMVExternalAlgorithmResultSPtr_doRemove);
        MethodCollector.o(19024);
        return nLEMVExternalAlgorithmResult;
    }

    public /* synthetic */ void add(int i, Object obj) {
        MethodCollector.i(19026);
        NLEMVExternalAlgorithmResult nLEMVExternalAlgorithmResult = (NLEMVExternalAlgorithmResult) obj;
        this.modCount++;
        NLEEditorJniJNI.VecNLEMVExternalAlgorithmResultSPtr_doAdd__SWIG_1(this.LIZIZ, this, i, NLEMVExternalAlgorithmResult.LIZ(nLEMVExternalAlgorithmResult), nLEMVExternalAlgorithmResult);
        MethodCollector.o(19026);
    }

    public void removeRange(int i, int i2) {
        MethodCollector.i(19019);
        this.modCount++;
        NLEEditorJniJNI.VecNLEMVExternalAlgorithmResultSPtr_doRemoveRange(this.LIZIZ, this, i, i2);
        MethodCollector.o(19019);
    }

    public /* synthetic */ Object set(int i, Object obj) {
        MethodCollector.i(19028);
        NLEMVExternalAlgorithmResult nLEMVExternalAlgorithmResult = (NLEMVExternalAlgorithmResult) obj;
        long VecNLEMVExternalAlgorithmResultSPtr_doSet = NLEEditorJniJNI.VecNLEMVExternalAlgorithmResultSPtr_doSet(this.LIZIZ, this, i, NLEMVExternalAlgorithmResult.LIZ(nLEMVExternalAlgorithmResult), nLEMVExternalAlgorithmResult);
        if (VecNLEMVExternalAlgorithmResultSPtr_doSet == 0) {
            MethodCollector.o(19028);
            return null;
        }
        NLEMVExternalAlgorithmResult nLEMVExternalAlgorithmResult2 = new NLEMVExternalAlgorithmResult(VecNLEMVExternalAlgorithmResultSPtr_doSet);
        MethodCollector.o(19028);
        return nLEMVExternalAlgorithmResult2;
    }
}
