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

    static {
        Covode.recordClassIndex(29927);
    }

    public void finalize() {
        LIZ();
    }

    public VecNLECherEffectSPtrConst() {
        this(NLEEditorJniJNI.new_VecNLECherEffectSPtrConst__SWIG_0());
        MethodCollector.i(16166);
        MethodCollector.o(16166);
    }

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

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

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

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

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

    public /* synthetic */ Object get(int i) {
        MethodCollector.i(16760);
        long VecNLECherEffectSPtrConst_doGet = NLEEditorJniJNI.VecNLECherEffectSPtrConst_doGet(this.LIZIZ, this, i);
        if (VecNLECherEffectSPtrConst_doGet == 0) {
            MethodCollector.o(16760);
            return null;
        }
        NLECherEffect nLECherEffect = new NLECherEffect(VecNLECherEffectSPtrConst_doGet);
        MethodCollector.o(16760);
        return nLECherEffect;
    }

    public /* synthetic */ boolean add(Object obj) {
        MethodCollector.i(16880);
        NLECherEffect nLECherEffect = (NLECherEffect) obj;
        this.modCount++;
        NLEEditorJniJNI.VecNLECherEffectSPtrConst_doAdd__SWIG_0(this.LIZIZ, this, NLECherEffect.LIZ(nLECherEffect), nLECherEffect);
        MethodCollector.o(16880);
        return true;
    }

    public /* synthetic */ Object remove(int i) {
        MethodCollector.i(16326);
        this.modCount++;
        long VecNLECherEffectSPtrConst_doRemove = NLEEditorJniJNI.VecNLECherEffectSPtrConst_doRemove(this.LIZIZ, this, i);
        if (VecNLECherEffectSPtrConst_doRemove == 0) {
            MethodCollector.o(16326);
            return null;
        }
        NLECherEffect nLECherEffect = new NLECherEffect(VecNLECherEffectSPtrConst_doRemove);
        MethodCollector.o(16326);
        return nLECherEffect;
    }

    public /* synthetic */ void add(int i, Object obj) {
        MethodCollector.i(16617);
        NLECherEffect nLECherEffect = (NLECherEffect) obj;
        this.modCount++;
        NLEEditorJniJNI.VecNLECherEffectSPtrConst_doAdd__SWIG_1(this.LIZIZ, this, i, NLECherEffect.LIZ(nLECherEffect), nLECherEffect);
        MethodCollector.o(16617);
    }

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

    public /* synthetic */ Object set(int i, Object obj) {
        MethodCollector.i(16759);
        NLECherEffect nLECherEffect = (NLECherEffect) obj;
        long VecNLECherEffectSPtrConst_doSet = NLEEditorJniJNI.VecNLECherEffectSPtrConst_doSet(this.LIZIZ, this, i, NLECherEffect.LIZ(nLECherEffect), nLECherEffect);
        if (VecNLECherEffectSPtrConst_doSet == 0) {
            MethodCollector.o(16759);
            return null;
        }
        NLECherEffect nLECherEffect2 = new NLECherEffect(VecNLECherEffectSPtrConst_doSet);
        MethodCollector.o(16759);
        return nLECherEffect2;
    }
}
