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

    static {
        Covode.recordClassIndex(29939);
    }

    public void finalize() {
        LIZ();
    }

    public VecNLEMappingNode() {
        this(NLETemplateJNI.new_VecNLEMappingNode__SWIG_0());
        MethodCollector.i(9478);
        MethodCollector.o(9478);
    }

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

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

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

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

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

    public /* synthetic */ Object get(int i) {
        MethodCollector.i(9893);
        long VecNLEMappingNode_doGet = NLETemplateJNI.VecNLEMappingNode_doGet(this.LIZIZ, this, i);
        if (VecNLEMappingNode_doGet == 0) {
            MethodCollector.o(9893);
            return null;
        }
        NLEMappingNode nLEMappingNode = new NLEMappingNode(VecNLEMappingNode_doGet);
        MethodCollector.o(9893);
        return nLEMappingNode;
    }

    public /* synthetic */ boolean add(Object obj) {
        MethodCollector.i(10150);
        NLEMappingNode nLEMappingNode = (NLEMappingNode) obj;
        this.modCount++;
        NLETemplateJNI.VecNLEMappingNode_doAdd__SWIG_0(this.LIZIZ, this, NLEMappingNode.LIZ(nLEMappingNode), nLEMappingNode);
        MethodCollector.o(10150);
        return true;
    }

    public /* synthetic */ Object remove(int i) {
        MethodCollector.i(9668);
        this.modCount++;
        long VecNLEMappingNode_doRemove = NLETemplateJNI.VecNLEMappingNode_doRemove(this.LIZIZ, this, i);
        if (VecNLEMappingNode_doRemove == 0) {
            MethodCollector.o(9668);
            return null;
        }
        NLEMappingNode nLEMappingNode = new NLEMappingNode(VecNLEMappingNode_doRemove);
        MethodCollector.o(9668);
        return nLEMappingNode;
    }

    public /* synthetic */ void add(int i, Object obj) {
        MethodCollector.i(9891);
        NLEMappingNode nLEMappingNode = (NLEMappingNode) obj;
        this.modCount++;
        NLETemplateJNI.VecNLEMappingNode_doAdd__SWIG_1(this.LIZIZ, this, i, NLEMappingNode.LIZ(nLEMappingNode), nLEMappingNode);
        MethodCollector.o(9891);
    }

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

    public /* synthetic */ Object set(int i, Object obj) {
        MethodCollector.i(9892);
        NLEMappingNode nLEMappingNode = (NLEMappingNode) obj;
        long VecNLEMappingNode_doSet = NLETemplateJNI.VecNLEMappingNode_doSet(this.LIZIZ, this, i, NLEMappingNode.LIZ(nLEMappingNode), nLEMappingNode);
        if (VecNLEMappingNode_doSet == 0) {
            MethodCollector.o(9892);
            return null;
        }
        NLEMappingNode nLEMappingNode2 = new NLEMappingNode(VecNLEMappingNode_doSet);
        MethodCollector.o(9892);
        return nLEMappingNode2;
    }
}
