Adds an element to the end of the list. This will increase the list's capacity if necessary. @param value the value to add
(int value)
| 212 | * @param value the value to add |
| 213 | */ |
| 214 | public void add(int value) { |
| 215 | throwIfImmutable(); |
| 216 | |
| 217 | growIfNeeded(); |
| 218 | |
| 219 | values[size++] = value; |
| 220 | |
| 221 | if (sorted && (size > 1)) { |
| 222 | sorted = (value >= values[size - 2]); |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | /** |
| 227 | * Inserts element into specified index, moving elements at and above |
no test coverage detected