in scala.collection.mutable
class SynchronizedStack

`class` SynchronizedStack [ A ]
  `extends` scala.collection.mutable.Stack[A]
  `with` scala.ScalaObject

  This is a synchronized version of the `Stack[T]` class. It implements a data structure which allows to store and retrieve objects in a last-in-first-out (LIFO) fashion.

author:
  Matthias Zenger
version:
  1.0, 03/05/2004

Constructor Summary
| `def` this

Def Summary
`override` | `def` ++= ( it : scala.Iterator[A] ) : scala.Unit 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.
`override` | `def` ++= ( iter : scala.Iterable[A] ) : scala.Unit Pushes all elements provided by an `Iterable` object on top of the stack. The elements are pushed in the order they are given out by the iterator.
`override` | `def` += ( elem : A ) : scala.Unit Pushes a single element on top of the stack.
`override` | `def` clear : scala.Unit Removes all elements from the stack. After this operation completed, the stack will be empty.
`override` | `def` elements : scala.Iterator[A] 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).
`override` | `def` equals ( that : scala.Any ) : scala.Boolean Checks if two stacks are structurally identical.
`override` | `def` hashCode : scala.Int The hashCode method always yields an error, since it is not safe to use mutable stacks as keys in hash tables.
`override` | `def` isEmpty : scala.Boolean Checks if the stack is empty.
`override` | `def` pop : A Removes the top element from the stack.
`override` | `def` push ( elems : A* ) : scala.Unit Pushes a sequence of elements on top of the stack. The first element is pushed first, etc.
`override` | `def` toList : scala.List[A] Creates a list of all stack elements in FIFO order.
`override` | `def` toString : java.lang.String Returns a textual representation of a stack as a string.
`override` | `def` top : A 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.

Constructor Detail

`def` this

Def Detail

override `def` ++= ( it : scala.Iterator[A] ) : scala.Unit

  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` ++= ( iter : scala.Iterable[A] ) : scala.Unit

  Pushes all elements provided by an `Iterable` 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` += ( elem : A ) : scala.Unit

  Pushes a single element on top of the stack.

param:
  elem the element to push onto the stack

override `def` clear : scala.Unit

  Removes all elements from the stack. After this operation completed, the stack will be empty.

override `def` elements : scala.Iterator[A]

  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` equals ( that : scala.Any ) : scala.Boolean

  Checks if two stacks are structurally identical.

return:
  true, iff both stacks contain the same sequence of elements.

override `def` hashCode : scala.Int

  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` isEmpty : scala.Boolean

  Checks if the stack is empty.

return:
  true, iff there is no element on the stack

override `def` pop : A

  Removes the top element from the stack.

override `def` push ( elems : A* ) : scala.Unit

  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` toList : scala.List[A]

  Creates a list of all stack elements in FIFO order.

return:
  the created list.

override `def` toString : java.lang.String

  Returns a textual representation of a stack as a string.

return:
  the string representation of this stack.

override `def` top : A

  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