Clarify behavior of MutableSet.add (KT-29373)
This commit is contained in:
committed by
Nikolay Igotti
parent
5d08060c89
commit
22a858df2c
@@ -17,7 +17,7 @@ public actual abstract class AbstractMutableSet<E> protected actual constructor(
|
||||
/**
|
||||
* Compares this set with another set instance with the unordered structural equality.
|
||||
*
|
||||
* @return true, if [other] instance is a [Set] of the same size, all elements of which are contained in this set.
|
||||
* @return `true`, if [other] instance is a [Set] of the same size, all elements of which are contained in this set.
|
||||
*/
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (other === this) return true
|
||||
|
||||
@@ -33,6 +33,12 @@ public interface MutableSet<E> : Set<E>, MutableCollection<E> {
|
||||
override fun iterator(): MutableIterator<E>
|
||||
|
||||
// Modification Operations
|
||||
|
||||
/**
|
||||
* Adds the specified element to the set.
|
||||
*
|
||||
* @return `true` if the element has been added, `false` if the element is already contained in the set.
|
||||
*/
|
||||
override fun add(element: E): Boolean
|
||||
|
||||
override fun remove(element: E): Boolean
|
||||
|
||||
Reference in New Issue
Block a user