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

    static {
        Covode.recordClassIndex(29942);
    }

    public void finalize() {
        LIZ();
    }

    public VecNLENode() {
        this(NLETemplateJNI.new_VecNLENode__SWIG_0());
        MethodCollector.i(10388);
        MethodCollector.o(10388);
    }

    public void clear() {
        MethodCollector.i(10390);
        NLETemplateJNI.VecNLENode_clear(this.LIZIZ, this);
        MethodCollector.o(10390);
    }

    public boolean isEmpty() {
        MethodCollector.i(10389);
        boolean VecNLENode_isEmpty = NLETemplateJNI.VecNLENode_isEmpty(this.LIZIZ, this);
        MethodCollector.o(10389);
        return VecNLENode_isEmpty;
    }

    public int size() {
        MethodCollector.i(10387);
        int VecNLENode_doSize = NLETemplateJNI.VecNLENode_doSize(this.LIZIZ, this);
        MethodCollector.o(10387);
        return VecNLENode_doSize;
    }

    private synchronized void LIZ() {
        MethodCollector.i(10385);
        long j = this.LIZIZ;
        if (j != 0) {
            if (this.LIZ) {
                this.LIZ = false;
                NLETemplateJNI.delete_VecNLENode(j);
            }
            this.LIZIZ = 0;
        }
        MethodCollector.o(10385);
    }

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

    public /* synthetic */ Object get(int i) {
        MethodCollector.i(11018);
        long VecNLENode_doGet = NLETemplateJNI.VecNLENode_doGet(this.LIZIZ, this, i);
        if (VecNLENode_doGet == 0) {
            MethodCollector.o(11018);
            return null;
        }
        NLENode nLENode = new NLENode(VecNLENode_doGet, true);
        MethodCollector.o(11018);
        return nLENode;
    }

    public /* synthetic */ boolean add(Object obj) {
        MethodCollector.i(11264);
        NLENode nLENode = (NLENode) obj;
        this.modCount++;
        NLETemplateJNI.VecNLENode_doAdd__SWIG_0(this.LIZIZ, this, NLENode.getCPtr(nLENode), nLENode);
        MethodCollector.o(11264);
        return true;
    }

    public /* synthetic */ Object remove(int i) {
        MethodCollector.i(10391);
        this.modCount++;
        long VecNLENode_doRemove = NLETemplateJNI.VecNLENode_doRemove(this.LIZIZ, this, i);
        if (VecNLENode_doRemove == 0) {
            MethodCollector.o(10391);
            return null;
        }
        NLENode nLENode = new NLENode(VecNLENode_doRemove, true);
        MethodCollector.o(10391);
        return nLENode;
    }

    public /* synthetic */ void add(int i, Object obj) {
        MethodCollector.i(10604);
        NLENode nLENode = (NLENode) obj;
        this.modCount++;
        NLETemplateJNI.VecNLENode_doAdd__SWIG_1(this.LIZIZ, this, i, NLENode.getCPtr(nLENode), nLENode);
        MethodCollector.o(10604);
    }

    public void removeRange(int i, int i2) {
        MethodCollector.i(10386);
        this.modCount++;
        NLETemplateJNI.VecNLENode_doRemoveRange(this.LIZIZ, this, i, i2);
        MethodCollector.o(10386);
    }

    public /* synthetic */ Object set(int i, Object obj) {
        MethodCollector.i(10818);
        NLENode nLENode = (NLENode) obj;
        long VecNLENode_doSet = NLETemplateJNI.VecNLENode_doSet(this.LIZIZ, this, i, NLENode.getCPtr(nLENode), nLENode);
        if (VecNLENode_doSet == 0) {
            MethodCollector.o(10818);
            return null;
        }
        NLENode nLENode2 = new NLENode(VecNLENode_doSet, true);
        MethodCollector.o(10818);
        return nLENode2;
    }
}
