Introduce Common protected property AbstractMutableList.modCount #KT-57150
This commit is contained in:
committed by
Space Team
parent
1626057f75
commit
5f16fb2e4d
@@ -11,6 +11,20 @@ package kotlin.collections
|
||||
* @param E the type of elements contained in the list. The list is invariant in its element type.
|
||||
*/
|
||||
public expect abstract class AbstractMutableList<E> : MutableList<E> {
|
||||
/**
|
||||
* The number of times this list is structurally modified.
|
||||
*
|
||||
* A modification is considered to be structural if it changes the list size,
|
||||
* or otherwise changes it in a way that iterations in progress may return incorrect results.
|
||||
*
|
||||
* This value can be used by iterators returned by [iterator] and [listIterator]
|
||||
* to provide fail-fast behavoir when a concurrent modification is detected during iteration.
|
||||
* [ConcurrentModificationException] will be thrown in this case.
|
||||
*/
|
||||
// TODO: Should be @SinceKotlin("2.0"), see KT-64904
|
||||
@SinceKotlin("1.9")
|
||||
protected var modCount: Int
|
||||
|
||||
protected constructor()
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user