toggleValue method
void
toggleValue(
- T value
Toggle a value in list
if value
exists, remove it
if value
does not exist, add it
Implementation
void toggleValue(T value) {
if (contains(value)) {
remove(value);
return;
}
add(value);
}