From cbc3a3b59590db4971779a65ad1afe962507f4cc Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Sat, 16 Jan 2016 18:44:04 +0300 Subject: [PATCH] Make IndexingIterator and IndexingIterable internal. --- .../stdlib/src/kotlin/collections/IndexingIterator.kt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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())