s.fisco-bcos-tars-sdk.3.5.0.source-code.H256Vector Maven / Gradle / Ivy
The newest version!
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package org.fisco.bcos.sdk.tars;
public class H256Vector extends java.util.AbstractList implements java.util.RandomAccess {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected H256Vector(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(H256Vector obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected static long swigRelease(H256Vector obj) {
long ptr = 0;
if (obj != null) {
if (!obj.swigCMemOwn)
throw new RuntimeException("Cannot release ownership as memory is not owned");
ptr = obj.swigCPtr;
obj.swigCMemOwn = false;
obj.delete();
}
return ptr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
bcosJNI.delete_H256Vector(swigCPtr);
}
swigCPtr = 0;
}
}
public H256Vector(SWIGTYPE_p_bcos__h256[] initialElements) {
this();
reserve(initialElements.length);
for (SWIGTYPE_p_bcos__h256 element : initialElements) {
add(element);
}
}
public H256Vector(Iterable initialElements) {
this();
for (SWIGTYPE_p_bcos__h256 element : initialElements) {
add(element);
}
}
public SWIGTYPE_p_bcos__h256 get(int index) {
return doGet(index);
}
public SWIGTYPE_p_bcos__h256 set(int index, SWIGTYPE_p_bcos__h256 e) {
return doSet(index, e);
}
public boolean add(SWIGTYPE_p_bcos__h256 e) {
modCount++;
doAdd(e);
return true;
}
public void add(int index, SWIGTYPE_p_bcos__h256 e) {
modCount++;
doAdd(index, e);
}
public SWIGTYPE_p_bcos__h256 remove(int index) {
modCount++;
return doRemove(index);
}
protected void removeRange(int fromIndex, int toIndex) {
modCount++;
doRemoveRange(fromIndex, toIndex);
}
public int size() {
return doSize();
}
public H256Vector() {
this(bcosJNI.new_H256Vector__SWIG_0(), true);
}
public H256Vector(H256Vector other) {
this(bcosJNI.new_H256Vector__SWIG_1(H256Vector.getCPtr(other), other), true);
}
public long capacity() {
return bcosJNI.H256Vector_capacity(swigCPtr, this);
}
public void reserve(long n) {
bcosJNI.H256Vector_reserve(swigCPtr, this, n);
}
public boolean isEmpty() {
return bcosJNI.H256Vector_isEmpty(swigCPtr, this);
}
public void clear() {
bcosJNI.H256Vector_clear(swigCPtr, this);
}
public H256Vector(int count, SWIGTYPE_p_bcos__h256 value) {
this(bcosJNI.new_H256Vector__SWIG_2(count, SWIGTYPE_p_bcos__h256.getCPtr(value)), true);
}
private int doSize() {
return bcosJNI.H256Vector_doSize(swigCPtr, this);
}
private void doAdd(SWIGTYPE_p_bcos__h256 x) {
bcosJNI.H256Vector_doAdd__SWIG_0(swigCPtr, this, SWIGTYPE_p_bcos__h256.getCPtr(x));
}
private void doAdd(int index, SWIGTYPE_p_bcos__h256 x) {
bcosJNI.H256Vector_doAdd__SWIG_1(swigCPtr, this, index, SWIGTYPE_p_bcos__h256.getCPtr(x));
}
private SWIGTYPE_p_bcos__h256 doRemove(int index) {
return new SWIGTYPE_p_bcos__h256(bcosJNI.H256Vector_doRemove(swigCPtr, this, index), true);
}
private SWIGTYPE_p_bcos__h256 doGet(int index) {
return new SWIGTYPE_p_bcos__h256(bcosJNI.H256Vector_doGet(swigCPtr, this, index), false);
}
private SWIGTYPE_p_bcos__h256 doSet(int index, SWIGTYPE_p_bcos__h256 val) {
return new SWIGTYPE_p_bcos__h256(bcosJNI.H256Vector_doSet(swigCPtr, this, index, SWIGTYPE_p_bcos__h256.getCPtr(val)), true);
}
private void doRemoveRange(int fromIndex, int toIndex) {
bcosJNI.H256Vector_doRemoveRange(swigCPtr, this, fromIndex, toIndex);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy