forked from yuangu/sxtwl_cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJDList.java
More file actions
144 lines (113 loc) · 3.21 KB
/
JDList.java
File metadata and controls
144 lines (113 loc) · 3.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.seantone.sxtwl;
public class JDList extends java.util.AbstractList<Double> implements java.util.RandomAccess {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected JDList(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(JDList obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
sxtwlJNI.delete_JDList(swigCPtr);
}
swigCPtr = 0;
}
}
public JDList(double[] initialElements) {
this();
reserve(initialElements.length);
for (double element : initialElements) {
add(element);
}
}
public JDList(Iterable<Double> initialElements) {
this();
for (double element : initialElements) {
add(element);
}
}
public Double get(int index) {
return doGet(index);
}
public Double set(int index, Double e) {
return doSet(index, e);
}
public boolean add(Double e) {
modCount++;
doAdd(e);
return true;
}
public void add(int index, Double e) {
modCount++;
doAdd(index, e);
}
public Double remove(int index) {
modCount++;
return doRemove(index);
}
protected void removeRange(int fromIndex, int toIndex) {
modCount++;
doRemoveRange(fromIndex, toIndex);
}
public int size() {
return doSize();
}
public JDList() {
this(sxtwlJNI.new_JDList__SWIG_0(), true);
}
public JDList(JDList other) {
this(sxtwlJNI.new_JDList__SWIG_1(JDList.getCPtr(other), other), true);
}
public long capacity() {
return sxtwlJNI.JDList_capacity(swigCPtr, this);
}
public void reserve(long n) {
sxtwlJNI.JDList_reserve(swigCPtr, this, n);
}
public boolean isEmpty() {
return sxtwlJNI.JDList_isEmpty(swigCPtr, this);
}
public void clear() {
sxtwlJNI.JDList_clear(swigCPtr, this);
}
public JDList(int count, double value) {
this(sxtwlJNI.new_JDList__SWIG_2(count, value), true);
}
private int doSize() {
return sxtwlJNI.JDList_doSize(swigCPtr, this);
}
private void doAdd(double x) {
sxtwlJNI.JDList_doAdd__SWIG_0(swigCPtr, this, x);
}
private void doAdd(int index, double x) {
sxtwlJNI.JDList_doAdd__SWIG_1(swigCPtr, this, index, x);
}
private double doRemove(int index) {
return sxtwlJNI.JDList_doRemove(swigCPtr, this, index);
}
private double doGet(int index) {
return sxtwlJNI.JDList_doGet(swigCPtr, this, index);
}
private double doSet(int index, double val) {
return sxtwlJNI.JDList_doSet(swigCPtr, this, index, val);
}
private void doRemoveRange(int fromIndex, int toIndex) {
sxtwlJNI.JDList_doRemoveRange(swigCPtr, this, fromIndex, toIndex);
}
}