summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2014-07-03 11:08:37 +0200
committerAdriaan Moors <adriaan.moors@typesafe.com>2014-07-03 11:08:37 +0200
commit4dcb51c5a15aa5f2ddd27ae19453364706bc72ea (patch)
tree42bd5e9458eb4ba8d5eb657446d42155d85f1cf0
parent300d6468b3590b6075a646d67f7412b81b651737 (diff)
parent23ae5c48b3c647361a63373c4f967022351d99dc (diff)
downloadscala-4dcb51c5a15aa5f2ddd27ae19453364706bc72ea.tar.gz
scala-4dcb51c5a15aa5f2ddd27ae19453364706bc72ea.tar.bz2
scala-4dcb51c5a15aa5f2ddd27ae19453364706bc72ea.zip
Merge pull request #3841 from Ichoran/issue/5200
SI-5200 Incorrect advice for implementing mutable.Set in scaladoc
-rw-r--r--src/library/scala/collection/SetLike.scala7
-rw-r--r--src/library/scala/collection/mutable/SetLike.scala17
2 files changed, 12 insertions, 12 deletions
diff --git a/src/library/scala/collection/SetLike.scala b/src/library/scala/collection/SetLike.scala
index 0c5c7e0b29..3e549f72cd 100644
--- a/src/library/scala/collection/SetLike.scala
+++ b/src/library/scala/collection/SetLike.scala
@@ -17,6 +17,9 @@ import parallel.ParSet
/** A template trait for sets.
*
* $setNote
+ * '''Implementation note:'''
+ * This trait provides most of the operations of a `Set` independently of its representation.
+ * It is typically inherited by concrete implementations of sets.
* $setTags
* @since 2.8
*
@@ -24,10 +27,6 @@ import parallel.ParSet
*
* A set is a collection that contains no duplicate elements.
*
- * '''Implementation note:'''
- * This trait provides most of the operations of a `Set` independently of its representation.
- * It is typically inherited by concrete implementations of sets.
- *
* To implement a concrete set, you need to provide implementations of the
* following methods:
* {{{
diff --git a/src/library/scala/collection/mutable/SetLike.scala b/src/library/scala/collection/mutable/SetLike.scala
index d749167870..a377b03124 100644
--- a/src/library/scala/collection/mutable/SetLike.scala
+++ b/src/library/scala/collection/mutable/SetLike.scala
@@ -16,19 +16,20 @@ import scala.annotation.migration
import parallel.mutable.ParSet
/** A template trait for mutable sets of type `mutable.Set[A]`.
+ *
+ * This trait provides most of the operations of a `mutable.Set` independently of its representation.
+ * It is typically inherited by concrete implementations of sets.
+ *
+ * $setNote
+ *
* @tparam A the type of the elements of the set
* @tparam This the type of the set itself.
*
- * $setnote
- *
* @author Martin Odersky
* @version 2.8
* @since 2.8
*
- * @define setnote
- * @note
- * This trait provides most of the operations of a `mutable.Set` independently of its representation.
- * It is typically inherited by concrete implementations of sets.
+ * @define setNote
*
* To implement a concrete mutable set, you need to provide implementations
* of the following methods:
@@ -36,13 +37,13 @@ import parallel.mutable.ParSet
* def contains(elem: A): Boolean
* def iterator: Iterator[A]
* def += (elem: A): this.type
- * def -= (elem: A): this.type</pre>
+ * def -= (elem: A): this.type
* }}}
* If you wish that methods like `take`,
* `drop`, `filter` return the same kind of set,
* you should also override:
* {{{
- * def empty: This</pre>
+ * def empty: This
* }}}
* It is also good idea to override methods `foreach` and
* `size` for efficiency.