us.ihmc.rtps.impl.fastRTPS.stringVector Maven / Gradle / Ivy
/* ----------------------------------------------------------------------------
* 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 us.ihmc.rtps.impl.fastRTPS;
public class stringVector extends java.util.AbstractList implements java.util.RandomAccess {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected stringVector(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(stringVector obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
FastRTPSJNI.delete_stringVector(swigCPtr);
}
swigCPtr = 0;
}
}
public stringVector(String[] initialElements) {
this();
reserve(initialElements.length);
for (String element : initialElements) {
add(element);
}
}
public stringVector(Iterable initialElements) {
this();
for (String element : initialElements) {
add(element);
}
}
public String get(int index) {
return doGet(index);
}
public String set(int index, String e) {
return doSet(index, e);
}
public boolean add(String e) {
modCount++;
doAdd(e);
return true;
}
public void add(int index, String e) {
modCount++;
doAdd(index, e);
}
public String remove(int index) {
modCount++;
return doRemove(index);
}
protected void removeRange(int fromIndex, int toIndex) {
modCount++;
doRemoveRange(fromIndex, toIndex);
}
public int size() {
return doSize();
}
public stringVector() {
this(FastRTPSJNI.new_stringVector__SWIG_0(), true);
}
public stringVector(stringVector other) {
this(FastRTPSJNI.new_stringVector__SWIG_1(stringVector.getCPtr(other), other), true);
}
public long capacity() {
return FastRTPSJNI.stringVector_capacity(swigCPtr, this);
}
public void reserve(long n) {
FastRTPSJNI.stringVector_reserve(swigCPtr, this, n);
}
public boolean isEmpty() {
return FastRTPSJNI.stringVector_isEmpty(swigCPtr, this);
}
public void clear() {
FastRTPSJNI.stringVector_clear(swigCPtr, this);
}
public stringVector(int count, String value) {
this(FastRTPSJNI.new_stringVector__SWIG_2(count, value), true);
}
private int doSize() {
return FastRTPSJNI.stringVector_doSize(swigCPtr, this);
}
private void doAdd(String x) {
FastRTPSJNI.stringVector_doAdd__SWIG_0(swigCPtr, this, x);
}
private void doAdd(int index, String x) {
FastRTPSJNI.stringVector_doAdd__SWIG_1(swigCPtr, this, index, x);
}
private String doRemove(int index) {
return FastRTPSJNI.stringVector_doRemove(swigCPtr, this, index);
}
private String doGet(int index) {
return FastRTPSJNI.stringVector_doGet(swigCPtr, this, index);
}
private String doSet(int index, String val) {
return FastRTPSJNI.stringVector_doSet(swigCPtr, this, index, val);
}
private void doRemoveRange(int fromIndex, int toIndex) {
FastRTPSJNI.stringVector_doRemoveRange(swigCPtr, this, fromIndex, toIndex);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy