Add LockFreeLinkedList<E>.iterator

This commit is contained in:
Him188 2020-02-22 13:48:40 +08:00
parent 801e3a68b1
commit 32dc95a6e4

View File

@ -68,6 +68,10 @@ fun <E> LockFreeLinkedList<E>.asSequence(): Sequence<E> {
}
}
operator fun <E> LockFreeLinkedList<E>.iterator(): Iterator<E> {
return asSequence().iterator()
}
/**
* 构建链表结构然后转为 [LockFreeLinkedList]
*/