protected open fun removeRange(fromIndex: Int, toIndex: Int): Unit
Removes from this list all of the elements whose index is between fromIndex
, inclusive, and toIndex
, exclusive. Shifts any succeeding elements to the left (reduces their index). This call shortens the list by (toIndex - fromIndex)
elements. (If toIndex==fromIndex
, this operation has no effect.)
IndexOutOfBoundsException
- if fromIndex
or toIndex
is out of range (fromIndex < 0 || fromIndex >= size() || toIndex > size() || toIndex < fromIndex
)