remove

fun remove(o: T): Boolean

Removes the first occurrence of the specified element from this list, if it is present.

If the list does not contain the element, it is unchanged.

More formally, removes the element with the lowest index i such that Objects.equals(o, get(i)) (if such an element exists).

Returns true if this list contained the specified element (or equivalently, if this list changed as a result of the call).

Return

true if this list contained the specified element.

Parameters

o

Element to be removed from this list, if present.