From b1c4590537dc15cc0238b6c83f8ad9e474264b98 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Thu, 27 Sep 2018 05:40:45 +0300 Subject: [PATCH] Override docs of MutableList.add/addAll methods #KT-25632 --- core/builtins/native/kotlin/Collections.kt | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/core/builtins/native/kotlin/Collections.kt b/core/builtins/native/kotlin/Collections.kt index 4698b1d6f47..f6bbb7ae47c 100644 --- a/core/builtins/native/kotlin/Collections.kt +++ b/core/builtins/native/kotlin/Collections.kt @@ -101,7 +101,7 @@ public interface MutableCollection : Collection, MutableIterable { // Bulk Modification Operations /** - * Adds all of the elements in the specified collection to this collection. + * Adds all of the elements of the specified collection to this collection. * * @return `true` if any of the specified elements was added to the collection, `false` if the collection was not modified. */ @@ -189,15 +189,27 @@ public interface List : Collection { */ public interface MutableList : List, MutableCollection { // Modification Operations + /** + * Adds the specified element to the end of this list. + * + * @return `true` because the list is always modified as the result of this operation. + */ override fun add(element: E): Boolean override fun remove(element: E): Boolean // Bulk Modification Operations + /** + * Adds all of the elements of the specified collection to the end of this list. + * + * The elements are appended in the order they appear in the [elements] collection. + * + * @return `true` if the list was changed as the result of the operation. + */ override fun addAll(elements: Collection): Boolean /** - * Inserts all of the elements in the specified collection [elements] into this list at the specified [index]. + * Inserts all of the elements of the specified collection [elements] into this list at the specified [index]. * * @return `true` if the list was changed as the result of the operation. */