summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/library/scala/collection/JavaConversions.scala2
-rw-r--r--src/library/scala/collection/generic/MutableSetTemplate.scala4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/library/scala/collection/JavaConversions.scala b/src/library/scala/collection/JavaConversions.scala
index f97686c942..3509d13373 100644
--- a/src/library/scala/collection/JavaConversions.scala
+++ b/src/library/scala/collection/JavaConversions.scala
@@ -396,7 +396,7 @@ object JavaConversions {
def +=(elem: A): this.type = { underlying.add(elem); this }
def -=(elem: A): this.type = { underlying.remove(elem); this }
- override def put(elem: A): Boolean = !underlying.add(elem)
+ override def add(elem: A): Boolean = underlying.add(elem)
override def remove(elem: A): Boolean = underlying.remove(elem)
override def clear = underlying.clear
diff --git a/src/library/scala/collection/generic/MutableSetTemplate.scala b/src/library/scala/collection/generic/MutableSetTemplate.scala
index 46134fcfee..0a3840cd3e 100644
--- a/src/library/scala/collection/generic/MutableSetTemplate.scala
+++ b/src/library/scala/collection/generic/MutableSetTemplate.scala
@@ -43,9 +43,9 @@ trait MutableSetTemplate[A, +This <: MutableSetTemplate[A, This] with mutable.Se
/** Adds a new element to the set.
*
* @param elem the element to be added
- * @return true if the element was already present in the set.
+ * @return true if the element was not yet present in the set.
*/
- def put(elem: A): Boolean = {
+ def add(elem: A): Boolean = {
val r = contains(elem)
this += elem
r