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

    static {
        Covode.recordClassIndex(29956);
    }

    public void finalize() {
        LIZ();
    }

    public VecNLETextTemplateClipSPtr() {
        this(NLEEditorJniJNI.new_VecNLETextTemplateClipSPtr__SWIG_0());
        MethodCollector.i(14101);
        MethodCollector.o(14101);
    }

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

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

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

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

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

    /* renamed from: LIZ */
    public final NLETextTemplateClip get(int i) {
        MethodCollector.i(14095);
        long VecNLETextTemplateClipSPtr_doGet = NLEEditorJniJNI.VecNLETextTemplateClipSPtr_doGet(this.LIZIZ, this, i);
        if (VecNLETextTemplateClipSPtr_doGet == 0) {
            MethodCollector.o(14095);
            return null;
        }
        NLETextTemplateClip nLETextTemplateClip = new NLETextTemplateClip(VecNLETextTemplateClipSPtr_doGet);
        MethodCollector.o(14095);
        return nLETextTemplateClip;
    }

    public /* synthetic */ boolean add(Object obj) {
        MethodCollector.i(14517);
        NLETextTemplateClip nLETextTemplateClip = (NLETextTemplateClip) obj;
        this.modCount++;
        NLEEditorJniJNI.VecNLETextTemplateClipSPtr_doAdd__SWIG_0(this.LIZIZ, this, NLETextTemplateClip.LIZ(nLETextTemplateClip), nLETextTemplateClip);
        MethodCollector.o(14517);
        return true;
    }

    public /* synthetic */ Object remove(int i) {
        MethodCollector.i(14105);
        this.modCount++;
        long VecNLETextTemplateClipSPtr_doRemove = NLEEditorJniJNI.VecNLETextTemplateClipSPtr_doRemove(this.LIZIZ, this, i);
        if (VecNLETextTemplateClipSPtr_doRemove == 0) {
            MethodCollector.o(14105);
            return null;
        }
        NLETextTemplateClip nLETextTemplateClip = new NLETextTemplateClip(VecNLETextTemplateClipSPtr_doRemove);
        MethodCollector.o(14105);
        return nLETextTemplateClip;
    }

    public /* synthetic */ void add(int i, Object obj) {
        MethodCollector.i(14110);
        NLETextTemplateClip nLETextTemplateClip = (NLETextTemplateClip) obj;
        this.modCount++;
        NLEEditorJniJNI.VecNLETextTemplateClipSPtr_doAdd__SWIG_1(this.LIZIZ, this, i, NLETextTemplateClip.LIZ(nLETextTemplateClip), nLETextTemplateClip);
        MethodCollector.o(14110);
    }

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

    public /* synthetic */ Object set(int i, Object obj) {
        MethodCollector.i(14318);
        NLETextTemplateClip nLETextTemplateClip = (NLETextTemplateClip) obj;
        long VecNLETextTemplateClipSPtr_doSet = NLEEditorJniJNI.VecNLETextTemplateClipSPtr_doSet(this.LIZIZ, this, i, NLETextTemplateClip.LIZ(nLETextTemplateClip), nLETextTemplateClip);
        if (VecNLETextTemplateClipSPtr_doSet == 0) {
            MethodCollector.o(14318);
            return null;
        }
        NLETextTemplateClip nLETextTemplateClip2 = new NLETextTemplateClip(VecNLETextTemplateClipSPtr_doSet);
        MethodCollector.o(14318);
        return nLETextTemplateClip2;
    }
}
