moveToTheEnd method
void
moveToTheEnd(
- T item
Moves the first occurrence of the item
to the end of the list.
Implementation
void moveToTheEnd(T item) {
int pos = indexOf(item);
if (pos != -1 && pos != length - 1) {
removeAt(pos);
add(item);
}
}