diff --git a/libraries/stdlib/src/kotlin/collections/IndexingIterator.kt b/libraries/stdlib/src/kotlin/collections/IndexingIterator.kt index 39bf33f4bd6..c28e056a06c 100644 --- a/libraries/stdlib/src/kotlin/collections/IndexingIterator.kt +++ b/libraries/stdlib/src/kotlin/collections/IndexingIterator.kt @@ -12,18 +12,14 @@ public data class IndexedValue(public val index: Int, public val value: T * A wrapper over another [Iterable] (or any other object that can produce an [Iterator]) that returns * an indexing iterator. */ -@Deprecated("This implementation class will become internal soon. Use Iterable> instead.", ReplaceWith("Iterable>")) -public class IndexingIterable(private val iteratorFactory: () -> Iterator) : Iterable> { +internal class IndexingIterable(private val iteratorFactory: () -> Iterator) : Iterable> { override fun iterator(): Iterator> = IndexingIterator(iteratorFactory()) } /** * Iterator transforming original `iterator` into iterator of [IndexedValue], counting index from zero. */ -@Deprecated("This implementation class will become internal soon. Use Iterator> instead.", ReplaceWith("Iterator>")) -public class IndexingIterator -@Deprecated("This implementation class will become internal soon. Use iterator.withIndex() instead.", ReplaceWith("iterator.withIndex()")) -constructor(private val iterator: Iterator) : Iterator> { +internal class IndexingIterator(private val iterator: Iterator) : Iterator> { private var index = 0 final override fun hasNext(): Boolean = iterator.hasNext() final override fun next(): IndexedValue = IndexedValue(index++, iterator.next())