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

    static {
        Covode.recordClassIndex(29950);
    }

    public void finalize() {
        LIZ();
    }

    public VecNLESegmentEffectStickerSPtrConst() {
        this(NLEEditorJniJNI.new_VecNLESegmentEffectStickerSPtrConst__SWIG_0());
        MethodCollector.i(18147);
        MethodCollector.o(18147);
    }

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

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

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

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

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

    public /* synthetic */ Object get(int i) {
        MethodCollector.i(18287);
        long VecNLESegmentEffectStickerSPtrConst_doGet = NLEEditorJniJNI.VecNLESegmentEffectStickerSPtrConst_doGet(this.LIZIZ, this, i);
        if (VecNLESegmentEffectStickerSPtrConst_doGet == 0) {
            MethodCollector.o(18287);
            return null;
        }
        NLESegmentEffectSticker nLESegmentEffectSticker = new NLESegmentEffectSticker(VecNLESegmentEffectStickerSPtrConst_doGet);
        MethodCollector.o(18287);
        return nLESegmentEffectSticker;
    }

    public /* synthetic */ boolean add(Object obj) {
        MethodCollector.i(18289);
        NLESegmentEffectSticker nLESegmentEffectSticker = (NLESegmentEffectSticker) obj;
        this.modCount++;
        NLEEditorJniJNI.VecNLESegmentEffectStickerSPtrConst_doAdd__SWIG_0(this.LIZIZ, this, NLESegmentEffectSticker.LIZ(nLESegmentEffectSticker), nLESegmentEffectSticker);
        MethodCollector.o(18289);
        return true;
    }

    public /* synthetic */ Object remove(int i) {
        MethodCollector.i(18151);
        this.modCount++;
        long VecNLESegmentEffectStickerSPtrConst_doRemove = NLEEditorJniJNI.VecNLESegmentEffectStickerSPtrConst_doRemove(this.LIZIZ, this, i);
        if (VecNLESegmentEffectStickerSPtrConst_doRemove == 0) {
            MethodCollector.o(18151);
            return null;
        }
        NLESegmentEffectSticker nLESegmentEffectSticker = new NLESegmentEffectSticker(VecNLESegmentEffectStickerSPtrConst_doRemove);
        MethodCollector.o(18151);
        return nLESegmentEffectSticker;
    }

    public /* synthetic */ void add(int i, Object obj) {
        MethodCollector.i(18204);
        NLESegmentEffectSticker nLESegmentEffectSticker = (NLESegmentEffectSticker) obj;
        this.modCount++;
        NLEEditorJniJNI.VecNLESegmentEffectStickerSPtrConst_doAdd__SWIG_1(this.LIZIZ, this, i, NLESegmentEffectSticker.LIZ(nLESegmentEffectSticker), nLESegmentEffectSticker);
        MethodCollector.o(18204);
    }

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

    public /* synthetic */ Object set(int i, Object obj) {
        MethodCollector.i(18286);
        NLESegmentEffectSticker nLESegmentEffectSticker = (NLESegmentEffectSticker) obj;
        long VecNLESegmentEffectStickerSPtrConst_doSet = NLEEditorJniJNI.VecNLESegmentEffectStickerSPtrConst_doSet(this.LIZIZ, this, i, NLESegmentEffectSticker.LIZ(nLESegmentEffectSticker), nLESegmentEffectSticker);
        if (VecNLESegmentEffectStickerSPtrConst_doSet == 0) {
            MethodCollector.o(18286);
            return null;
        }
        NLESegmentEffectSticker nLESegmentEffectSticker2 = new NLESegmentEffectSticker(VecNLESegmentEffectStickerSPtrConst_doSet);
        MethodCollector.o(18286);
        return nLESegmentEffectSticker2;
    }
}
