Lines Matching refs:size

31     /** {@code >= 0;} current size of the list */
32 private int size;
90 throw new IllegalArgumentException("size < 0");
93 size = 0;
102 for (int i = 0; i < size; i++) {
126 if (size != otherList.size) {
130 for (int i = 0; i < size; i++) {
142 StringBuffer sb = new StringBuffer(size * 5 + 10);
146 for (int i = 0; i < size; i++) {
161 public int size() {
162 return size;
168 * @param n {@code >= 0, < size();} which element
172 if (n >= size) {
173 throw new IndexOutOfBoundsException("n >= size()");
187 * @param n {@code >= 0, < size();} which element
193 if (n >= size) {
194 throw new IndexOutOfBoundsException("n >= size()");
219 values[size++] = value;
221 if (sorted && (size > 1)) {
222 sorted = (value >= values[size - 2]);
229 * current size (that is, insertion as a last element is legal but
232 * @param n {@code >= 0, <=size();} index of where to insert
236 if (n > size) {
237 throw new IndexOutOfBoundsException("n > size()");
242 System.arraycopy (values, n, values, n+1, size - n);
244 size++;
248 && (n == (size - 1) || value < values[n+1]);
255 * @param n {@code >=0, < size();} index of element to remove
258 if (n >= size) {
259 throw new IndexOutOfBoundsException("n >= size()");
262 System.arraycopy (values, n + 1, values, n, size - n - 1);
263 size--;
269 * Increases size of array if needed
272 if (size == values.length) {
274 int[] newv = new int[size * 3 / 2 + 10];
275 System.arraycopy(values, 0, newv, 0, size);
287 return get(size - 1);
291 * Pops an element off the end of the list and decreasing the size by one.
301 result = get(size-1);
302 size--;
308 * Pops N elements off the end of the list and decreasing the size by N.
316 size -= n;
320 * Shrinks the size of the list.
322 * @param newSize {@code >= 0;} the new size
329 if (newSize > size) {
330 throw new IllegalArgumentException("newSize > size");
335 size = newSize;
344 int sz = size;
361 Arrays.sort(values, 0, size);
385 * {@code -size()} if the element is not found.
392 int sz = size;