Operates exactly as #add(int, java.lang.Integer) @param index the index to add the value into @param element the value to add
(int index, int element)
| 80 | * @param element the value to add |
| 81 | */ |
| 82 | public void add(int index, int element) |
| 83 | { |
| 84 | if (index == size())//special case, just appending |
| 85 | { |
| 86 | add(element); |
| 87 | } |
| 88 | else |
| 89 | { |
| 90 | boundsCheck(index); |
| 91 | enlargeIfNeeded(1); |
| 92 | System.arraycopy(array, index, array, index+1, end-index); |
| 93 | array[index] = element; |
| 94 | end++; |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | @Override |
| 99 | public void add(int index, Integer element) |