diff options
author | Martin Odersky <odersky@gmail.com> | 2009-05-25 22:35:40 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2009-05-25 22:35:40 +0000 |
commit | c3afb3feaaed3f4910092014a03f0d203f77f42c (patch) | |
tree | e94bafbb7706b59605c709ea50188bf4c3c9d356 /src/library | |
parent | 607cb4250d1b92d819525df61460bf412bc1c916 (diff) | |
download | scala-c3afb3feaaed3f4910092014a03f0d203f77f42c.tar.gz scala-c3afb3feaaed3f4910092014a03f0d203f77f42c.tar.bz2 scala-c3afb3feaaed3f4910092014a03f0d203f77f42c.zip |
rest of collections check-in
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/collection/JavaConversions.scala | 2 | ||||
-rw-r--r-- | src/library/scala/collection/generic/MutableSetTemplate.scala | 4 |
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 |