Adds an element to the array if it is not contained yet. @param element element to be added @return result of check
(final int element)
| 122 | * @return result of check |
| 123 | */ |
| 124 | public IntList addUnique(final int element) { |
| 125 | if(!contains(element)) add(element); |
| 126 | return this; |
| 127 | } |
| 128 | |
| 129 | /** |
| 130 | * Inserts elements at the specified index position. |