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

    static {
        Covode.recordClassIndex(29949);
    }

    public void finalize() {
        LIZ();
    }

    public VecNLESegmentEffectStickerSPtr() {
        this(NLEEditorJniJNI.new_VecNLESegmentEffectStickerSPtr__SWIG_0());
        MethodCollector.i(15249);
        MethodCollector.o(15249);
    }

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

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

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

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

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

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

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

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

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

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

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