summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2010-07-28 11:26:15 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2010-07-28 11:26:15 +0000
commitbc0ed202b6006ee8e3ccdf71b800ed99246437a8 (patch)
treef4e6c596ff796bef07f7f3dd6e2174f609cb2e9a
parent9d3eef33c58ff9135ea0f104cd11dd5d4af6c54e (diff)
downloadscala-bc0ed202b6006ee8e3ccdf71b800ed99246437a8.tar.gz
scala-bc0ed202b6006ee8e3ccdf71b800ed99246437a8.tar.bz2
scala-bc0ed202b6006ee8e3ccdf71b800ed99246437a8.zip
[docs] Documentation updates contributed throug...
[docs] Documentation updates contributed through Colladoc. No review.
-rw-r--r--src/library/scala/Application.scala4
-rw-r--r--src/library/scala/collection/TraversableLike.scala7
-rw-r--r--src/library/scala/collection/immutable/StringLike.scala3
-rw-r--r--src/library/scala/compat/Platform.scala24
4 files changed, 24 insertions, 14 deletions
diff --git a/src/library/scala/Application.scala b/src/library/scala/Application.scala
index efc64191ae..21e6b68091 100644
--- a/src/library/scala/Application.scala
+++ b/src/library/scala/Application.scala
@@ -73,8 +73,8 @@ import scala.compat.Platform.currentTime
trait Application {
- /** The time when execution of this program started.
- */
+ /** The time when the execution of this program started, in milliseconds since 1
+ * January 1970 UTC. */
val executionStart: Long = currentTime
/** The default main method.
diff --git a/src/library/scala/collection/TraversableLike.scala b/src/library/scala/collection/TraversableLike.scala
index 6f851fb5e7..a307ccbf3f 100644
--- a/src/library/scala/collection/TraversableLike.scala
+++ b/src/library/scala/collection/TraversableLike.scala
@@ -494,10 +494,9 @@ trait TraversableLike[+A, +Repr] extends HasNewBuilder[A, Repr]
}
/** Selects the last element.
- * $orderDependent
- * @return the first element of this $coll.
- * @throws `NoSuchElementException` if the $coll is empty.
- */
+ * $orderDependent
+ * @return The last element of this $coll.
+ * @throws NoSuchElementException If the $coll is empty. */
def last: A = {
var lst = head
for (x <- this)
diff --git a/src/library/scala/collection/immutable/StringLike.scala b/src/library/scala/collection/immutable/StringLike.scala
index 0c327195a4..6fe6b4555d 100644
--- a/src/library/scala/collection/immutable/StringLike.scala
+++ b/src/library/scala/collection/immutable/StringLike.scala
@@ -148,7 +148,8 @@ self =>
if (toString.startsWith(prefix)) toString.substring(prefix.length)
else toString
- /** Returns this string with the given `suffix` stripped. */
+ /** Returns this string with the given `suffix` stripped. If this string does not
+ * end with `suffix`, it is returned unchanged. */
def stripSuffix(suffix: String) =
if (toString.endsWith(suffix)) toString.substring(0, toString.length() - suffix.length)
else toString
diff --git a/src/library/scala/compat/Platform.scala b/src/library/scala/compat/Platform.scala
index bf402a7968..8187360d6f 100644
--- a/src/library/scala/compat/Platform.scala
+++ b/src/library/scala/compat/Platform.scala
@@ -17,13 +17,23 @@ object Platform {
type StackOverflowError = java.lang.StackOverflowError
type ConcurrentModificationException = java.util.ConcurrentModificationException
- /**
- * @param src ..
- * @param srcPos ..
- * @param dest ..
- * @param destPos ..
- * @param length ..
- */
+ /** Copies `length` elements of array `src` starting at position `srcPos` to the
+ * array `dest` starting at position `destPos`. If `src eq dest`, the copying will
+ * behave as if the elements copied from `src` were first copied to a temporary
+ * array before being copied back into the array at the destination positions.
+ * @param src A non-null array as source for the copy.
+ * @param srcPos The starting index in the source array.
+ * @param dest A non-null array as destination for the copy.
+ * @param destPos The starting index in the destination array.
+ * @param length The number of elements to be copied.
+ * @throws java.lang.NullPointerException If either `src` or `dest` are `null`.
+ * @throws java.lang.ArrayStoreException If either `src` or `dest` are not of type
+ * [java.lang.Array]; or if the element type of `src` is not
+ * compatible with that of `dest`.
+ * @throws java.lang.IndexOutOfBoundsException If either srcPos` or `destPos` are
+ * outside of the bounds of their respective arrays; or if `length`
+ * is negative; or if there are less than `length` elements available
+ * after `srcPos` or `destPos` in `src` and `dest` respectively. */
@inline
def arraycopy(src: AnyRef, srcPos: Int, dest: AnyRef, destPos: Int, length: Int) {
System.arraycopy(src, srcPos, dest, destPos, length)