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

    static {
        Covode.recordClassIndex(29971);
    }

    public void finalize() {
        LIZ();
    }

    public void clear() {
        MethodCollector.i(2520);
        NLEMediaJniJNI.VecNLEWatermarkEntity_clear(this.LIZ, this);
        MethodCollector.o(2520);
    }

    public boolean isEmpty() {
        MethodCollector.i(2436);
        boolean VecNLEWatermarkEntity_isEmpty = NLEMediaJniJNI.VecNLEWatermarkEntity_isEmpty(this.LIZ, this);
        MethodCollector.o(2436);
        return VecNLEWatermarkEntity_isEmpty;
    }

    public int size() {
        MethodCollector.i(4211);
        int VecNLEWatermarkEntity_doSize = NLEMediaJniJNI.VecNLEWatermarkEntity_doSize(this.LIZ, this);
        MethodCollector.o(4211);
        return VecNLEWatermarkEntity_doSize;
    }

    public VecNLEWatermarkEntity() {
        this(NLEMediaJniJNI.new_VecNLEWatermarkEntity__SWIG_0(), true);
        MethodCollector.i(2374);
        MethodCollector.o(2374);
    }

    private synchronized void LIZ() {
        MethodCollector.i(4196);
        long j = this.LIZ;
        if (j != 0) {
            if (this.LIZIZ) {
                this.LIZIZ = false;
                NLEMediaJniJNI.delete_VecNLEWatermarkEntity(j);
            }
            this.LIZ = 0;
        }
        MethodCollector.o(4196);
    }

    /* access modifiers changed from: private */
    /* renamed from: LIZ */
    public boolean add(NLEWatermarkEntity nLEWatermarkEntity) {
        this.modCount++;
        LIZIZ(nLEWatermarkEntity);
        return true;
    }

    private void LIZIZ(NLEWatermarkEntity nLEWatermarkEntity) {
        MethodCollector.i(2605);
        NLEWatermarkEntity nLEWatermarkEntity2 = nLEWatermarkEntity;
        NLEMediaJniJNI.VecNLEWatermarkEntity_doAdd__SWIG_0(this.LIZ, this, NLEWatermarkEntity.LIZ(nLEWatermarkEntity2), nLEWatermarkEntity2);
        MethodCollector.o(2605);
    }

    public /* synthetic */ Object get(int i) {
        MethodCollector.i(2812);
        NLEWatermarkEntity nLEWatermarkEntity = new NLEWatermarkEntity(NLEMediaJniJNI.VecNLEWatermarkEntity_doGet(this.LIZ, this, i));
        MethodCollector.o(2812);
        return nLEWatermarkEntity;
    }

    public /* synthetic */ Object remove(int i) {
        MethodCollector.i(2666);
        this.modCount++;
        NLEWatermarkEntity nLEWatermarkEntity = new NLEWatermarkEntity(NLEMediaJniJNI.VecNLEWatermarkEntity_doRemove(this.LIZ, this, i));
        MethodCollector.o(2666);
        return nLEWatermarkEntity;
    }

    public VecNLEWatermarkEntity(Iterable<NLEWatermarkEntity> iterable) {
        this();
        for (NLEWatermarkEntity LIZ2 : iterable) {
            add(LIZ2);
        }
    }

    public VecNLEWatermarkEntity(long j, boolean z) {
        this.LIZIZ = z;
        this.LIZ = j;
    }

    public /* synthetic */ void add(int i, Object obj) {
        MethodCollector.i(2675);
        NLEWatermarkEntity nLEWatermarkEntity = (NLEWatermarkEntity) obj;
        this.modCount++;
        NLEMediaJniJNI.VecNLEWatermarkEntity_doAdd__SWIG_1(this.LIZ, this, i, NLEWatermarkEntity.LIZ(nLEWatermarkEntity), nLEWatermarkEntity);
        MethodCollector.o(2675);
    }

    public void removeRange(int i, int i2) {
        MethodCollector.i(4207);
        this.modCount++;
        NLEMediaJniJNI.VecNLEWatermarkEntity_doRemoveRange(this.LIZ, this, i, i2);
        MethodCollector.o(4207);
    }

    public /* synthetic */ Object set(int i, Object obj) {
        MethodCollector.i(2745);
        NLEWatermarkEntity nLEWatermarkEntity = (NLEWatermarkEntity) obj;
        NLEWatermarkEntity nLEWatermarkEntity2 = new NLEWatermarkEntity(NLEMediaJniJNI.VecNLEWatermarkEntity_doSet(this.LIZ, this, i, NLEWatermarkEntity.LIZ(nLEWatermarkEntity), nLEWatermarkEntity));
        MethodCollector.o(2745);
        return nLEWatermarkEntity2;
    }
}
