diff options
author | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2010-04-08 16:09:24 +0000 |
---|---|---|
committer | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2010-04-08 16:09:24 +0000 |
commit | 0e437ba3095d732430a8b8cbd468aa74e5b307fe (patch) | |
tree | eb275f6cecdff1708be43e52d344237026f4f620 /src | |
parent | 24bc8b350a9a54b5286fa5fbdf308dd34c2a736e (diff) | |
download | scala-0e437ba3095d732430a8b8cbd468aa74e5b307fe.tar.gz scala-0e437ba3095d732430a8b8cbd468aa74e5b307fe.tar.bz2 scala-0e437ba3095d732430a8b8cbd468aa74e5b307fe.zip |
More cleanups in docs. Review by odersky.
Diffstat (limited to 'src')
4 files changed, 20 insertions, 20 deletions
diff --git a/src/library/scala/collection/SeqLike.scala b/src/library/scala/collection/SeqLike.scala index 6c33873820..c35039c520 100644 --- a/src/library/scala/collection/SeqLike.scala +++ b/src/library/scala/collection/SeqLike.scala @@ -296,7 +296,7 @@ trait SeqLike[+A, +Repr] extends IterableLike[A, Repr] { self => * @return the index `>= from` of the first element of this $coll that is equal (wrt `==`) * to `elem`, or `-1`, if none exists. * - * @usecase def indexOf(elem: A): Int + * @usecase def indexOf(elem: A, from: Int): Int */ def indexOf[B >: A](elem: B, from: Int): Int = indexWhere(elem ==, from) @@ -321,7 +321,7 @@ trait SeqLike[+A, +Repr] extends IterableLike[A, Repr] { self => * @return the index `<= end` of the last element of this $coll that is equal (wrt `==`) * to `elem`, or `-1`, if none exists. * - * @usecase def lastIndexOf(elem: A): Int + * @usecase def lastIndexOf(elem: A, end: Int): Int */ def lastIndexOf[B >: A](elem: B, end: Int): Int = lastIndexWhere(elem ==, end) diff --git a/src/library/scala/collection/TraversableLike.scala b/src/library/scala/collection/TraversableLike.scala index a220bda833..c5db41005e 100644 --- a/src/library/scala/collection/TraversableLike.scala +++ b/src/library/scala/collection/TraversableLike.scala @@ -688,7 +688,7 @@ trait TraversableLike[+A, +Repr] extends HasNewBuilder[A, Repr] with Traversable def toTraversable: Traversable[A] = thisCollection def toIterator: Iterator[A] = toIterable.iterator - /** Converts this $coll to a string + /** Converts this $coll to a string. * @return a string representation of this collection. By default this * string consists of the `stringPrefix` of this $coll, * followed by all elements separated by commas and enclosed in parentheses. diff --git a/src/library/scala/collection/TraversableOnce.scala b/src/library/scala/collection/TraversableOnce.scala index 351de93a73..ad3a8c6198 100644 --- a/src/library/scala/collection/TraversableOnce.scala +++ b/src/library/scala/collection/TraversableOnce.scala @@ -141,7 +141,7 @@ trait TraversableOnce[+A] { * @param z the start value * @param op the binary operator * @tparam B the result type of the binary operator. - * @return the result of inserting `op` between consecutive elements of this $coll$, + * @return the result of inserting `op` between consecutive elements of this $coll, * going right to left with the start value `z` on the right: * {{{ * op(x,,1,,, op(x,,2,,, ... op(x,,n,,, z)...)) @@ -158,7 +158,7 @@ trait TraversableOnce[+A] { * @param z the start value. * @param op the binary operator. * @tparam B the result type of the binary operator. - * @return the result of inserting `op` between consecutive elements of this $coll$, + * @return the result of inserting `op` between consecutive elements of this $coll, * going left to right with the start value `z` on the left: * {{{ * op(...op(z, x,,1,,), x,,2,,, ..., x,,n,,) @@ -178,7 +178,7 @@ trait TraversableOnce[+A] { * @param z the start value. * @param op the binary operator. * @tparam B the result type of the binary operator. - * @return the result of inserting `op` between consecutive elements of this $coll$, + * @return the result of inserting `op` between consecutive elements of this $coll, * going right to left with the start value `z` on the right: * {{{ * op(x,,1,,, op(x,,2,,, ... op(x,,n,,, z)...)) @@ -194,7 +194,7 @@ trait TraversableOnce[+A] { * * @param op the binary operator. * @tparam B the result type of the binary operator. - * @return the result of inserting `op` between consecutive elements of this $coll$, + * @return the result of inserting `op` between consecutive elements of this $coll, * going left to right: * {{{ * op(...(op(x,,1,,, x,,2,,), ... ) , x,,n,,) @@ -225,7 +225,7 @@ trait TraversableOnce[+A] { * * @param op the binary operator. * @tparam B the result type of the binary operator. - * @return the result of inserting `op` between consecutive elements of this $coll$, + * @return the result of inserting `op` between consecutive elements of this $coll, * going right to left: * {{{ * op(x,,1,,, op(x,,2,,, ..., op(x,,n-1,,, x,,n,,)...)) @@ -335,9 +335,9 @@ trait TraversableOnce[+A] { */ def copyToBuffer[B >: A](dest: Buffer[B]): Unit = dest ++= self - /** Copies values produced by this iterator to an array. - * Fills the given array `xs` with values produced by this iterator, after skipping `start` values. - * Copying will stop once either the end of the current iterator is reached, + /** Copies values of this $coll to an array. + * Fills the given array `xs` with values of this $coll, after skipping `start` values. + * Copying will stop once either the end of the current $coll is reached, * or the end of the array is reached. * * $willNotTerminateInf @@ -346,14 +346,14 @@ trait TraversableOnce[+A] { * @param start the starting index. * @tparam B the type of the elements of the array. * - * @usecase def copyToArray(xs: Array[A], start: Int, len: Int): Unit + * @usecase def copyToArray(xs: Array[A], start: Int): Unit */ def copyToArray[B >: A](xs: Array[B], start: Int): Unit = copyToArray(xs, start, xs.length - start) - /** Copies values produced by this iterator to an array. - * Fills the given array `xs` with values produced by this iterator. - * Copying will stop once either the end of the current iterator is reached, + /** Copies values of this $coll to an array. + * Fills the given array `xs` with values of this $coll. + * Copying will stop once either the end of the current $coll is reached, * or the end of the array is reached. * * $willNotTerminateInf @@ -361,7 +361,7 @@ trait TraversableOnce[+A] { * @param xs the array to fill. * @tparam B the type of the elements of the array. * - * @usecase def copyToArray(xs: Array[A], start: Int, len: Int): Unit + * @usecase def copyToArray(xs: Array[A]): Unit */ def copyToArray[B >: A](xs: Array[B]): Unit = copyToArray(xs, 0, xs.length) diff --git a/src/library/scala/collection/immutable/Stream.scala b/src/library/scala/collection/immutable/Stream.scala index dc1f2b6536..7f0b21050a 100644 --- a/src/library/scala/collection/immutable/Stream.scala +++ b/src/library/scala/collection/immutable/Stream.scala @@ -72,17 +72,17 @@ self => def append[B >: A](rest: => Traversable[B]): Stream[B] = if (isEmpty) rest.toStream else new Stream.Cons(head, tail append rest) - /** Force evaluation of the whole stream and return it */ + /** Forces evaluation of the whole stream and returns it. */ def force: Stream[A] = { var these = this while (!these.isEmpty) these = these.tail this } - /** Prints elements of this stream one by one, separated by commas */ + /** Prints elements of this stream one by one, separated by commas. */ def print() { print(", ") } - /** Prints elements of this stream one by one, separated by <code>sep</code> + /** Prints elements of this stream one by one, separated by <code>sep</code>. * @param sep The separator string printed between consecutive elements. */ def print(sep: String) { @@ -113,7 +113,7 @@ self => } /** Create a new stream which contains all elements of this stream - * followed by all elements of Traversable `that' + * followed by all elements of Traversable `that`. * @note It's subtle why this works. We know that if the target type * of the Builder That is either a Stream, or one of its supertypes, or undefined, * then StreamBuilder will be chosen for the implicit. |