summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormihaylov <mihaylov@epfl.ch>2006-11-10 23:04:57 +0000
committermihaylov <mihaylov@epfl.ch>2006-11-10 23:04:57 +0000
commit61f333639f2f34be8f0b955d858c8fc028dbdea2 (patch)
tree2c529c45971e2f4a1d819d32de99c14de1067743
parente46598c08926ed3c623272f213f724bff99d3e98 (diff)
downloadscala-61f333639f2f34be8f0b955d858c8fc028dbdea2.tar.gz
scala-61f333639f2f34be8f0b955d858c8fc028dbdea2.tar.bz2
scala-61f333639f2f34be8f0b955d858c8fc028dbdea2.zip
Improved @throws in scaladoc comments
-rw-r--r--src/library/scala/List.scala10
-rw-r--r--src/library/scala/collection/immutable/ListSet.scala6
-rw-r--r--src/library/scala/collection/immutable/Queue.scala6
-rw-r--r--src/library/scala/collection/mutable/ArrayBuffer.scala8
-rw-r--r--src/library/scala/collection/mutable/ListBuffer.scala10
-rw-r--r--src/library/scala/collection/mutable/PriorityQueue.scala2
-rw-r--r--src/library/scala/collection/mutable/Queue.scala4
-rw-r--r--src/library/scala/collection/mutable/Set.scala2
-rw-r--r--src/library/scala/collection/mutable/Stack.scala4
-rw-r--r--src/library/scala/xml/Group.scala10
10 files changed, 31 insertions, 31 deletions
diff --git a/src/library/scala/List.scala b/src/library/scala/List.scala
index 581122448c..eb53f5173c 100644
--- a/src/library/scala/List.scala
+++ b/src/library/scala/List.scala
@@ -385,13 +385,13 @@ sealed abstract class List[+a] extends Seq[a] {
/** Returns this first element of the list.
* @return the first element of this list.
- * @throws <code>scala.compat.Platform.NoSuchElementException</code> if the list is empty.
+ * @throws <code>Predef.NoSuchElementException</code> if the list is empty.
*/
def head: a
/** Returns this list without its first element.
* @return this list without its first element.
- * @throws <code>scala.compat.Platform.NoSuchElementException</code> if the list is empty.
+ * @throws <code>Predef.NoSuchElementException</code> if the list is empty.
*/
def tail: List[a]
@@ -493,7 +493,7 @@ sealed abstract class List[+a] extends Seq[a] {
/** Returns the list without its last element.
*
* @return the list without its last element.
- * @throws <code>scala.compat.Platform.UnsupportedOperationException</code>
+ * @throws <code>Predef.UnsupportedOperationException</code>
* if the list is empty.
*/
def init: List[a] =
@@ -513,7 +513,7 @@ sealed abstract class List[+a] extends Seq[a] {
/** Returns the last element of this list.
*
* @return the last element of the list.
- * @throws <code>scala.compat.Platform.UnsupportedOperationException</code>
+ * @throws <code>Predef.UnsupportedOperationException</code>
* if the list is empty.
*/
def last: a =
@@ -646,7 +646,7 @@ sealed abstract class List[+a] extends Seq[a] {
*
* @param n index of the element to return
* @return the element at position <code>n</code> in this list.
- * @throws <code>java.lang.RuntimeException</code> if the list is too short.
+ * @throws <code>Predef.NoSuchElementException</code> if the list is too short.
*/
def apply(n: Int): a = drop(n).head
diff --git a/src/library/scala/collection/immutable/ListSet.scala b/src/library/scala/collection/immutable/ListSet.scala
index 823e3f02b3..3e95923b2c 100644
--- a/src/library/scala/collection/immutable/ListSet.scala
+++ b/src/library/scala/collection/immutable/ListSet.scala
@@ -60,7 +60,7 @@ class ListSet[A] extends AnyRef with Set[A] {
/** Creates a new iterator over all elements contained in this set.
*
- * @throws scala.compat.Platform.NoSuchElementException
+ * @throws Predef.NoSuchElementException
* @return the new iterator
*/
def elements: Iterator[A] = new Iterator[A] {
@@ -82,12 +82,12 @@ class ListSet[A] extends AnyRef with Set[A] {
false
/**
- * @throws scala.compat.Platform.NoSuchElementException
+ * @throws Predef.NoSuchElementException
*/
protected def elem: A = throw new NoSuchElementException("Set has no elelemnts");
/**
- * @throws scala.compat.Platform.NoSuchElementException
+ * @throws Predef.NoSuchElementException
*/
protected def next: ListSet[A] = throw new NoSuchElementException("Next of an empty set");
diff --git a/src/library/scala/collection/immutable/Queue.scala b/src/library/scala/collection/immutable/Queue.scala
index ebfbbf7e19..e63492592c 100644
--- a/src/library/scala/collection/immutable/Queue.scala
+++ b/src/library/scala/collection/immutable/Queue.scala
@@ -41,7 +41,7 @@ class Queue[+A](elem: A*) extends Seq[A] {
*
* @param n index of the element to return
* @return the element at position <code>n</code> in this queue.
- * @throws scala.compat.Platform.NoSuchElementException if the queue is too short.
+ * @throws Predef.NoSuchElementException if the queue is too short.
*/
def apply(n: Int): A = {
val len = out.length
@@ -97,7 +97,7 @@ class Queue[+A](elem: A*) extends Seq[A] {
/** Returns a tuple with the first element in the queue,
* and a new queue with this element removed.
*
- * @throws scala.compat.Platform.NoSuchElementException
+ * @throws Predef.NoSuchElementException
* @return the first element of the queue.
*/
def dequeue: Pair[A, Queue[A]] = {
@@ -111,7 +111,7 @@ class Queue[+A](elem: A*) extends Seq[A] {
/** Returns the first element in the queue, or throws an error if there
* is no element contained in the queue.
*
- * @throws scala.compat.Platform.NoSuchElementException
+ * @throws Predef.NoSuchElementException
* @return the first element.
*/
def front: A =
diff --git a/src/library/scala/collection/mutable/ArrayBuffer.scala b/src/library/scala/collection/mutable/ArrayBuffer.scala
index f15ccd9106..6fa7da2b74 100644
--- a/src/library/scala/collection/mutable/ArrayBuffer.scala
+++ b/src/library/scala/collection/mutable/ArrayBuffer.scala
@@ -63,7 +63,7 @@ class ArrayBuffer[A] extends Buffer[A] with ResizableArray[A] {
*
* @param i the specified index.
* @return the i-th element.
- * @throws IndexOutOfBoundException if <code>i</code> is out of bounds.
+ * @throws Predef.IndexOutOfBoundException if <code>i</code> is out of bounds.
*/
override def apply(i: Int) = {
if ((i < 0) || (i >= size))
@@ -87,7 +87,7 @@ class ArrayBuffer[A] extends Buffer[A] with ResizableArray[A] {
*
* @param n the index where a new element will be inserted.
* @param iter the iterable object providing all elements to insert.
- * @throws IndexOutOfBoundsException if <code>n</code> is out of bounds.
+ * @throws Predef.IndexOutOfBoundsException if <code>n</code> is out of bounds.
*/
def insertAll(n: Int, iter: Iterable[A]): Unit = {
if ((n < 0) || (n > size))
@@ -105,7 +105,7 @@ class ArrayBuffer[A] extends Buffer[A] with ResizableArray[A] {
*
* @param n the index of the element to replace.
* @param newelem the new element.
- * @throws IndexOutOfBoundsException if <code>n</code> is out of bounds.
+ * @throws Predef.IndexOutOfBoundsException if <code>n</code> is out of bounds.
*/
def update(n: Int, newelem: A): Unit = {
if ((n < 0) || (n >= size))
@@ -121,7 +121,7 @@ class ArrayBuffer[A] extends Buffer[A] with ResizableArray[A] {
*
* @param n the index which refers to the element to delete.
* @return the updated array buffer.
- * @throws IndexOutOfBoundsException if <code>n</code> is out of bounds.
+ * @throws Predef.IndexOutOfBoundsException if <code>n</code> is out of bounds.
*/
def remove(n: Int): A = {
if ((n < 0) || (n >= size))
diff --git a/src/library/scala/collection/mutable/ListBuffer.scala b/src/library/scala/collection/mutable/ListBuffer.scala
index 0907f1f50c..5ec6e6eb7c 100644
--- a/src/library/scala/collection/mutable/ListBuffer.scala
+++ b/src/library/scala/collection/mutable/ListBuffer.scala
@@ -125,7 +125,7 @@ final class ListBuffer[A] extends Buffer[A] {
*
* @param n the position of the element to be returned.
* @return the n-th element of this buffer.
- * @throws scala.compat.Platform.IndexOutOfBoundsException
+ * @throws Predef.IndexOutOfBoundsException
*/
def apply(n: Int): A = try {
start(n)
@@ -139,7 +139,7 @@ final class ListBuffer[A] extends Buffer[A] {
*
* @param n the index of the element to replace.
* @param x the new element.
- * @throws scala.compat.Platform.IndexOutOfBoundsException if <code>n</code> is out of bounds.
+ * @throws Predef.IndexOutOfBoundsException if <code>n</code> is out of bounds.
*/
def update(n: Int, x: A): unit = try {
if (exported) copy()
@@ -168,7 +168,7 @@ final class ListBuffer[A] extends Buffer[A] {
*
* @param n the index where a new element will be inserted.
* @param iter the iterable object providing all elements to insert.
- * @throws scala.compat.Platform.IndexOutOfBoundsException if <code>n</code> is out of bounds.
+ * @throws Predef.IndexOutOfBoundsException if <code>n</code> is out of bounds.
*/
def insertAll(n: Int, iter: Iterable[A]): unit = try {
if (exported) copy()
@@ -205,7 +205,7 @@ final class ListBuffer[A] extends Buffer[A] {
* @param n the index which refers to the element to delete.
* @return n the element that was formerly at position <code>n</code>.
* @pre an element exists at position <code>n</code>
- * @throws scala.compat.Platform.IndexOutOfBoundsException if <code>n</code> is out of bounds.
+ * @throws Predef.IndexOutOfBoundsException if <code>n</code> is out of bounds.
*/
def remove(n: Int): A = try {
if (exported) copy()
@@ -239,7 +239,7 @@ final class ListBuffer[A] extends Buffer[A] {
* <code>toList.elements</code>.
* </blockquote>
*
- * @throws scala.compat.Platform.NoSuchElementException if buffer is empty
+ * @throws Predef.NoSuchElementException if buffer is empty
*/
override def elements = new Iterator[A] {
var cursor: List[A] = null
diff --git a/src/library/scala/collection/mutable/PriorityQueue.scala b/src/library/scala/collection/mutable/PriorityQueue.scala
index 2eb6298141..8950a9fa0f 100644
--- a/src/library/scala/collection/mutable/PriorityQueue.scala
+++ b/src/library/scala/collection/mutable/PriorityQueue.scala
@@ -91,7 +91,7 @@ class PriorityQueue[A <% Ordered[A]] extends ResizableArray[A] {
/** Returns the element with the highest priority in the queue,
* and removes this element from the queue.
*
- * @throws scala.compat.Platform.NoSuchElementException
+ * @throws Predef.NoSuchElementException
* @return the element with the highest priority.
*/
def dequeue: A =
diff --git a/src/library/scala/collection/mutable/Queue.scala b/src/library/scala/collection/mutable/Queue.scala
index 3dbd38320b..7d31b2b66e 100644
--- a/src/library/scala/collection/mutable/Queue.scala
+++ b/src/library/scala/collection/mutable/Queue.scala
@@ -60,7 +60,7 @@ class Queue[A] extends MutableList[A] {
/** Returns the first element in the queue, and removes this element
* from the queue.
*
- * @throws scala.compat.Platform.NoSuchElementException
+ * @throws Predef.NoSuchElementException
* @return the first element of the queue.
*/
def dequeue: A =
@@ -173,7 +173,7 @@ class Queue[A] extends MutableList[A] {
/** The hashCode method always yields an error, since it is not
* safe to use mutable queues as keys in hash tables.
*
- * @throws scala.compat.Platform.UnsupportedOperationException
+ * @throws Predef.UnsupportedOperationException
* @return never.
*/
override def hashCode(): Int = throw new UnsupportedOperationException("unsuitable as hash key")
diff --git a/src/library/scala/collection/mutable/Set.scala b/src/library/scala/collection/mutable/Set.scala
index 83133392af..825102475f 100644
--- a/src/library/scala/collection/mutable/Set.scala
+++ b/src/library/scala/collection/mutable/Set.scala
@@ -105,7 +105,7 @@ trait Set[A] extends AnyRef with collection.Set[A]
/** Send a message to this scriptable object.
*
* @param cmd the message to send.
- * @throws <code>scala.compat.Platform.UnsupportedOperationException</code>
+ * @throws <code>Predef.UnsupportedOperationException</code>
* if the message was not understood.
*/
def <<(cmd: Message[A]): Unit = cmd match {
diff --git a/src/library/scala/collection/mutable/Stack.scala b/src/library/scala/collection/mutable/Stack.scala
index 59ad02e860..825e87c629 100644
--- a/src/library/scala/collection/mutable/Stack.scala
+++ b/src/library/scala/collection/mutable/Stack.scala
@@ -60,14 +60,14 @@ class Stack[A] extends MutableList[A] {
* the element from the stack. An error is signaled if there is no
* element on the stack.
*
- * @throws scala.compat.Platform.NoSuchElementException
+ * @throws Predef.NoSuchElementException
* @return the top element
*/
def top: A = if (first == null) throw new NoSuchElementException("stack empty") else first.elem
/** Removes the top element from the stack.
*
- * @throws scala.compat.Platform.NoSuchElementException
+ * @throws Predef.NoSuchElementException
* @return the top element
*/
def pop: A =
diff --git a/src/library/scala/xml/Group.scala b/src/library/scala/xml/Group.scala
index fb39e060f5..745b771794 100644
--- a/src/library/scala/xml/Group.scala
+++ b/src/library/scala/xml/Group.scala
@@ -34,31 +34,31 @@ case class Group(val nodes: Seq[Node]) extends Node {
}
/**
- * @throws scala.compat.Platform.UnsupportedOperationException (always)
+ * @throws Predef.UnsupportedOperationException (always)
*/
final def label =
throw new UnsupportedOperationException("class Group does not support method 'label'")
/**
- * @throws scala.compat.Platform.UnsupportedOperationException (always)
+ * @throws Predef.UnsupportedOperationException (always)
*/
final override def attributes =
throw new UnsupportedOperationException("class Group does not support method 'attributes'")
/**
- * @throws scala.compat.Platform.UnsupportedOperationException (always)
+ * @throws Predef.UnsupportedOperationException (always)
*/
final override def namespace =
throw new UnsupportedOperationException("class Group does not support method 'namespace'")
/**
- * @throws scala.compat.Platform.UnsupportedOperationException (always)
+ * @throws Predef.UnsupportedOperationException (always)
*/
final override def child =
throw new UnsupportedOperationException("class Group does not support method 'child'")
/**
- * @throws scala.compat.Platform.UnsupportedOperationException (always)
+ * @throws Predef.UnsupportedOperationException (always)
*/
def toString(sb: StringBuilder) =
throw new UnsupportedOperationException("class Group does not support method toString(StringBuilder)")