summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/TraversableOnce.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-07-29 23:58:45 +0000
committerPaul Phillips <paulp@improving.org>2011-07-29 23:58:45 +0000
commit67a63278a6c4e9347792219086f11a87d177eee7 (patch)
tree411bab57bbcd9f408ee4230420a7897de952f58b /src/library/scala/collection/TraversableOnce.scala
parentaf412cd72e6e35e7c76ee24e9fa65b73293f0082 (diff)
downloadscala-67a63278a6c4e9347792219086f11a87d177eee7.tar.gz
scala-67a63278a6c4e9347792219086f11a87d177eee7.tar.bz2
scala-67a63278a6c4e9347792219086f11a87d177eee7.zip
- Update Scaladoc for LinkedList and for some o...
- Update Scaladoc for LinkedList and for some of the functions/operators - that it inherits. Completed Scaladoc for append Added example - in GenSeqLike for apply. Added $collectExample to collect in - GenTraversableLike and supplied an actual example in LinkedList Contributed by Donald McLean.
Diffstat (limited to 'src/library/scala/collection/TraversableOnce.scala')
-rw-r--r--src/library/scala/collection/TraversableOnce.scala39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/library/scala/collection/TraversableOnce.scala b/src/library/scala/collection/TraversableOnce.scala
index 01619b0ab0..4f125b4090 100644
--- a/src/library/scala/collection/TraversableOnce.scala
+++ b/src/library/scala/collection/TraversableOnce.scala
@@ -271,6 +271,19 @@ trait TraversableOnce[+A] extends GenTraversableOnce[A] {
* Inside, the string representations (w.r.t. the method `toString`)
* of all elements of this $coll are separated by the string `sep`.
*
+ * Example:
+ *
+ * {{{
+ * scala> val a = LinkedList(1,2,3,4)
+ * a: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2, 3, 4)
+ *
+ * scala> val b = new StringBuilder()
+ * b: StringBuilder =
+ *
+ * scala> a.addString(b, "LinkedList(", ", ", ")")
+ * res1: StringBuilder = LinkedList(1, 2, 3, 4)
+ * }}}
+ *
* @param b the string builder to which elements are appended.
* @param start the starting string.
* @param sep the separator string.
@@ -300,6 +313,19 @@ trait TraversableOnce[+A] extends GenTraversableOnce[A] {
* The written text consists of the string representations (w.r.t. the method `toString`)
* of all elements of this $coll, separated by the string `sep`.
*
+ * Example:
+ *
+ * {{{
+ * scala> val a = LinkedList(1,2,3,4)
+ * a: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2, 3, 4)
+ *
+ * scala> val b = new StringBuilder()
+ * b: StringBuilder =
+ *
+ * scala> a.addString(b, ", ")
+ * res0: StringBuilder = 1, 2, 3, 4
+ * }}}
+ *
* @param b the string builder to which elements are appended.
* @param sep the separator string.
* @return the string builder `b` to which elements were appended.
@@ -310,6 +336,19 @@ trait TraversableOnce[+A] extends GenTraversableOnce[A] {
* The written text consists of the string representations (w.r.t. the method
* `toString`) of all elements of this $coll without any separator string.
*
+ * Example:
+ *
+ * {{{
+ * scala> val a = LinkedList(1,2,3,4)
+ * a: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2, 3, 4)
+ *
+ * scala> val b = new StringBuilder()
+ * b: StringBuilder =
+ *
+ * scala> val h = a.addString(b)
+ * b: StringBuilder = 1234
+ * }}}
+
* @param b the string builder to which elements are appended.
* @return the string builder `b` to which elements were appended.
*/