(String value)
| 199 | |
| 200 | // Remove the first instance of a particular value and return its index. |
| 201 | @SuppressWarnings("unused") |
| 202 | public int removeValue(String value) { |
| 203 | if (value == null) { |
| 204 | for (int i = 0; i < count; i++) { |
| 205 | if (data[i] == null) { |
| 206 | remove(i); |
| 207 | return i; |
| 208 | } |
| 209 | } |
| 210 | } else { |
| 211 | int index = index(value); |
| 212 | if (index != -1) { |
| 213 | remove(index); |
| 214 | return index; |
| 215 | } |
| 216 | } |
| 217 | return -1; |
| 218 | } |
| 219 | |
| 220 | |
| 221 | // Remove all instances of a particular value and return the count removed. |
no test coverage detected