diff options
author | michelou <michelou@epfl.ch> | 2006-10-04 12:18:48 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2006-10-04 12:18:48 +0000 |
commit | 9f013a7ccd34f6ee169ff7189f503a9f2b097fff (patch) | |
tree | c919bac9c550a1160f998b0acd4bff081cf98462 /src/library/scala/collection/mutable/SynchronizedStack.scala | |
parent | 3e985a3e8d8119ee1e9c417cd25345a819caabe9 (diff) | |
download | scala-9f013a7ccd34f6ee169ff7189f503a9f2b097fff.tar.gz scala-9f013a7ccd34f6ee169ff7189f503a9f2b097fff.tar.bz2 scala-9f013a7ccd34f6ee169ff7189f503a9f2b097fff.zip |
removed leading/trailing tabs/blanks in collect...
removed leading/trailing tabs/blanks in collection/mutable/*.scala
Diffstat (limited to 'src/library/scala/collection/mutable/SynchronizedStack.scala')
-rw-r--r-- | src/library/scala/collection/mutable/SynchronizedStack.scala | 176 |
1 files changed, 88 insertions, 88 deletions
diff --git a/src/library/scala/collection/mutable/SynchronizedStack.scala b/src/library/scala/collection/mutable/SynchronizedStack.scala index d2e2d44735..6b774f2dd2 100644 --- a/src/library/scala/collection/mutable/SynchronizedStack.scala +++ b/src/library/scala/collection/mutable/SynchronizedStack.scala @@ -9,7 +9,7 @@ // $Id$ -package scala.collection.mutable; +package scala.collection.mutable /** This is a synchronized version of the <code>Stack[T]</code> class. It @@ -21,91 +21,91 @@ package scala.collection.mutable; */ class SynchronizedStack[A] extends Stack[A] { - /** Checks if the stack is empty. - * - * @return true, iff there is no element on the stack - */ - override def isEmpty: Boolean = synchronized { super.isEmpty } - - /** Pushes a single element on top of the stack. - * - * @param elem the element to push onto the stack - */ - override def +=(elem: A): Unit = synchronized { super.+=(elem); } - - /** Pushes all elements provided by an <code>Iterable</code> object - * on top of the stack. The elements are pushed in the order they - * are given out by the iterator. - * - * @param iter an iterable object - */ - override def ++=(iter: Iterable[A]): Unit = synchronized { super.++=(iter); } - - /** Pushes all elements provided by an iterator - * on top of the stack. The elements are pushed in the order they - * are given out by the iterator. - * - * @param iter an iterator - */ - override def ++=(it: Iterator[A]): Unit = synchronized { super.++=(it); } - - /** Pushes a sequence of elements on top of the stack. The first element - * is pushed first, etc. - * - * @param elems a sequence of elements - */ - override def push(elems: A*): Unit = synchronized { super.++=(elems); } - - /** Returns the top element of the stack. This method will not remove - * the element from the stack. An error is signaled if there is no - * element on the stack. - * - * @return the top element - */ - override def top: A = synchronized { super.top; } - - /** Removes the top element from the stack. - */ - override def pop: A = synchronized { super.pop; } - - /** - * Removes all elements from the stack. After this operation completed, - * the stack will be empty. - */ - override def clear: Unit = synchronized { super.clear; } - - /** Returns an iterator over all elements on the stack. This iterator - * is stable with respect to state changes in the stack object; i.e. - * such changes will not be reflected in the iterator. The iterator - * issues elements in the order they were inserted into the stack - * (FIFO order). - * - * @return an iterator over all stack elements. - */ - override def elements: Iterator[A] = synchronized { super.elements; } - - /** Creates a list of all stack elements in FIFO order. - * - * @return the created list. - */ - override def toList: List[A] = synchronized { super.toList; } - - /** Checks if two stacks are structurally identical. - * - * @return true, iff both stacks contain the same sequence of elements. - */ - override def equals(that: Any): Boolean = synchronized { super.equals(that); } - - /** The hashCode method always yields an error, since it is not - * safe to use mutable stacks as keys in hash tables. - * - * @return never. - */ - override def hashCode(): Int = synchronized { super.hashCode(); } - - /** Returns a textual representation of a stack as a string. - * - * @return the string representation of this stack. - */ - override def toString() = synchronized { super.toString(); } + /** Checks if the stack is empty. + * + * @return true, iff there is no element on the stack + */ + override def isEmpty: Boolean = synchronized { super.isEmpty } + + /** Pushes a single element on top of the stack. + * + * @param elem the element to push onto the stack + */ + override def +=(elem: A): Unit = synchronized { super.+=(elem) } + + /** Pushes all elements provided by an <code>Iterable</code> object + * on top of the stack. The elements are pushed in the order they + * are given out by the iterator. + * + * @param iter an iterable object + */ + override def ++=(iter: Iterable[A]): Unit = synchronized { super.++=(iter) } + + /** Pushes all elements provided by an iterator + * on top of the stack. The elements are pushed in the order they + * are given out by the iterator. + * + * @param iter an iterator + */ + override def ++=(it: Iterator[A]): Unit = synchronized { super.++=(it) } + + /** Pushes a sequence of elements on top of the stack. The first element + * is pushed first, etc. + * + * @param elems a sequence of elements + */ + override def push(elems: A*): Unit = synchronized { super.++=(elems) } + + /** Returns the top element of the stack. This method will not remove + * the element from the stack. An error is signaled if there is no + * element on the stack. + * + * @return the top element + */ + override def top: A = synchronized { super.top } + + /** Removes the top element from the stack. + */ + override def pop: A = synchronized { super.pop } + + /** + * Removes all elements from the stack. After this operation completed, + * the stack will be empty. + */ + override def clear: Unit = synchronized { super.clear } + + /** Returns an iterator over all elements on the stack. This iterator + * is stable with respect to state changes in the stack object; i.e. + * such changes will not be reflected in the iterator. The iterator + * issues elements in the order they were inserted into the stack + * (FIFO order). + * + * @return an iterator over all stack elements. + */ + override def elements: Iterator[A] = synchronized { super.elements } + + /** Creates a list of all stack elements in FIFO order. + * + * @return the created list. + */ + override def toList: List[A] = synchronized { super.toList } + + /** Checks if two stacks are structurally identical. + * + * @return true, iff both stacks contain the same sequence of elements. + */ + override def equals(that: Any): Boolean = synchronized { super.equals(that) } + + /** The hashCode method always yields an error, since it is not + * safe to use mutable stacks as keys in hash tables. + * + * @return never. + */ + override def hashCode(): Int = synchronized { super.hashCode() } + + /** Returns a textual representation of a stack as a string. + * + * @return the string representation of this stack. + */ + override def toString() = synchronized { super.toString() } } |