/** * Pops N elements off the end of the list and decreasing the size by N. * * @param n {@code >= 0;} number of elements to remove from end * @throws IndexOutOfBoundsException if stack is smaller than N */ public void pop(int n) { throwIfImmutable(); size -= n; }
/** * Pops N elements off the end of the list and decreasing the size by N. * * @param n {@code >= 0;} number of elements to remove from end * @throws IndexOutOfBoundsException if stack is smaller than N */ public void pop(int n) { throwIfImmutable(); size -= n; }
/** * Pops N elements off the end of the list and decreasing the size by N. * * @param n {@code >= 0;} number of elements to remove from end * @throws IndexOutOfBoundsException if stack is smaller than N */ public void pop(int n) { throwIfImmutable(); size -= n; }
/** * Pops N elements off the end of the list and decreasing the size by N. * * @param n {@code >= 0;} number of elements to remove from end * @throws IndexOutOfBoundsException if stack is smaller than N */ public void pop(int n) { throwIfImmutable(); size -= n; }
/** * Pops N elements off the end of the list and decreasing the size by N. * * @param n {@code >= 0;} number of elements to remove from end * @throws IndexOutOfBoundsException if stack is smaller than N */ public void pop(int n) { throwIfImmutable(); size -= n; }
/** * Pops N elements off the end of the list and decreasing the size by N. * * @param n {@code >= 0;} number of elements to remove from end * @throws IndexOutOfBoundsException if stack is smaller than N */ public void pop(int n) { throwIfImmutable(); size -= n; }
/** * Pops N elements off the end of the list and decreasing the size by N. * * @param n {@code >= 0;} number of elements to remove from end. * @exception IndexOutOfBoundsException if stack is smaller than N */ public void pop(int n) { throwIfImmutable(); size -= n; }
/** * Sorts the elements in the list in-place. */ public void sort() { throwIfImmutable(); if (!sorted) { Arrays.sort(values, 0, size); sorted = true; } }
/** * Sorts the elements in the list in-place. */ public void sort() { throwIfImmutable(); if (!sorted) { Arrays.sort(values, 0, size); sorted = true; } }
/** * Sorts the elements in the list in-place. */ public void sort() { throwIfImmutable(); if (!sorted) { Arrays.sort(values, 0, size); sorted = true; } }
/** * Sorts the elements in the list in-place. */ public void sort() { throwIfImmutable(); if (!sorted) { Arrays.sort(values, 0, size); sorted = true; } }
/** * Sorts the elements in the list in-place. */ public void sort() { throwIfImmutable(); if (!sorted) { Arrays.sort(values, 0, size); sorted = true; } }
/** * Sorts the elements in the list in-place. */ public void sort() { throwIfImmutable(); if (!sorted) { Arrays.sort(values, 0, size); sorted = true; } }
/** * Sorts the elements in the list in-place. */ public void sort() { throwIfImmutable(); if (!sorted) { Arrays.sort(values, 0, size); sorted = true; } }
/** * Sorts the elements in the list in-place. */ public void sort() { throwIfImmutable(); if (!sorted) { Arrays.sort(values, 0, size); sorted = true; } }
/** * Pops an element off the end of the list and decreasing the size by one. * * @return value from what was the last element * @throws IndexOutOfBoundsException if stack is empty */ public int pop() { throwIfImmutable(); int result; result = get(size-1); size--; return result; }
/** * Pops an element off the end of the list and decreasing the size by one. * * @return value from what was the last element * @throws IndexOutOfBoundsException if stack is empty */ public int pop() { throwIfImmutable(); int result; result = get(size-1); size--; return result; }
/** * Adds an element to the end of the list. This will increase the * list's capacity if necessary. * * @param value the value to add */ public void add(int value) { throwIfImmutable(); growIfNeeded(); values[size++] = value; if (sorted && (size > 1)) { sorted = (value >= values[size - 2]); } }
/** * Pops an element off the end of the list and decreasing the size by one. * * @return value from what was the last element * @throws IndexOutOfBoundsException if stack is empty */ public int pop() { throwIfImmutable(); int result; result = get(size-1); size--; return result; }
/** * Pops an element off the end of the list and decreasing the size by one. * * @return value from what was the last element * @throws IndexOutOfBoundsException if stack is empty */ public int pop() { throwIfImmutable(); int result; result = get(size-1); size--; return result; }