addIfNotContains method
void
addIfNotContains(
- T element
Adds an element to the list if it does not already contain it.
Implementation
void addIfNotContains(T element) {
if (!contains(element)) {
add(element);
}
}