(int index)
| 150 | } |
| 151 | |
| 152 | private void checkIndex(int index) { |
| 153 | if (index < 0 || index >= size) { |
| 154 | throw new IllegalArgumentException("Add failed! Require index >=0 and index < size."); |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | private void checkIndexForAdd(int index) { |
| 159 | if(index < 0 || index > size) { |