All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com._4paradigm.openmldb.DAGNodeList Maven / Gradle / Ivy

There is a newer version: 0.9.2-macos
Show newest version
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 4.0.1
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com._4paradigm.openmldb;

public class DAGNodeList extends java.util.AbstractList implements java.util.RandomAccess {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

  protected DAGNodeList(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(DAGNodeList obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  @SuppressWarnings("deprecation")
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        sql_router_sdkJNI.delete_DAGNodeList(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public DAGNodeList(DAGNode[] initialElements) {
    this();
    reserve(initialElements.length);

    for (DAGNode element : initialElements) {
      add(element);
    }
  }

  public DAGNodeList(Iterable initialElements) {
    this();
    for (DAGNode element : initialElements) {
      add(element);
    }
  }

  public DAGNode get(int index) {
    return doGet(index);
  }

  public DAGNode set(int index, DAGNode e) {
    return doSet(index, e);
  }

  public boolean add(DAGNode e) {
    modCount++;
    doAdd(e);
    return true;
  }

  public void add(int index, DAGNode e) {
    modCount++;
    doAdd(index, e);
  }

  public DAGNode remove(int index) {
    modCount++;
    return doRemove(index);
  }

  protected void removeRange(int fromIndex, int toIndex) {
    modCount++;
    doRemoveRange(fromIndex, toIndex);
  }

  public int size() {
    return doSize();
  }

  public DAGNodeList() {
    this(sql_router_sdkJNI.new_DAGNodeList__SWIG_0(), true);
  }

  public DAGNodeList(DAGNodeList other) {
    this(sql_router_sdkJNI.new_DAGNodeList__SWIG_1(DAGNodeList.getCPtr(other), other), true);
  }

  public long capacity() {
    return sql_router_sdkJNI.DAGNodeList_capacity(swigCPtr, this);
  }

  public void reserve(long n) {
    sql_router_sdkJNI.DAGNodeList_reserve(swigCPtr, this, n);
  }

  public boolean isEmpty() {
    return sql_router_sdkJNI.DAGNodeList_isEmpty(swigCPtr, this);
  }

  public void clear() {
    sql_router_sdkJNI.DAGNodeList_clear(swigCPtr, this);
  }

  public DAGNodeList(int count, DAGNode value) {
    this(sql_router_sdkJNI.new_DAGNodeList__SWIG_2(count, DAGNode.getCPtr(value), value), true);
  }

  private int doSize() {
    return sql_router_sdkJNI.DAGNodeList_doSize(swigCPtr, this);
  }

  private void doAdd(DAGNode x) {
    sql_router_sdkJNI.DAGNodeList_doAdd__SWIG_0(swigCPtr, this, DAGNode.getCPtr(x), x);
  }

  private void doAdd(int index, DAGNode x) {
    sql_router_sdkJNI.DAGNodeList_doAdd__SWIG_1(swigCPtr, this, index, DAGNode.getCPtr(x), x);
  }

  private DAGNode doRemove(int index) {
    long cPtr = sql_router_sdkJNI.DAGNodeList_doRemove(swigCPtr, this, index);
    return (cPtr == 0) ? null : new DAGNode(cPtr, true);
  }

  private DAGNode doGet(int index) {
    long cPtr = sql_router_sdkJNI.DAGNodeList_doGet(swigCPtr, this, index);
    return (cPtr == 0) ? null : new DAGNode(cPtr, true);
  }

  private DAGNode doSet(int index, DAGNode val) {
    long cPtr = sql_router_sdkJNI.DAGNodeList_doSet(swigCPtr, this, index, DAGNode.getCPtr(val), val);
    return (cPtr == 0) ? null : new DAGNode(cPtr, true);
  }

  private void doRemoveRange(int fromIndex, int toIndex) {
    sql_router_sdkJNI.DAGNodeList_doRemoveRange(swigCPtr, this, fromIndex, toIndex);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy