scala.collection.mutable
class SynchronizedQueue

[source: `scala/collection/mutable/SynchronizedQueue.scala`]

`` `class` SynchronizedQueue[A]
  `extends` Queue[A]

  This is a synchronized version of the `Queue[T]` class. It implements a data structure that allows one to insert and retrieve elements in a first-in-first-out (FIFO) manner.

Author
  Matthias Zenger
Version
  1.0, 03/05/2004

Values and Variables inherited from MutableList
first0, last0, len

Method Summary
`override def` | ++= (iter : Iterable[A]) : Unit Adds all elements provided by an `Iterable` object at the end of the queue. The elements are prepended in the order they are given out by the iterator.
`override def` | ++= (it : Iterator[A]) : Unit Adds all elements provided by an iterator at the end of the queue. The elements are prepended in the order they are given out by the iterator.
`override def` | += (elem : A) : Unit Inserts a single element at the end of the queue.
`override def` | clear : Unit Removes all elements from the queue. After this operation is completed, the queue will be empty.
`override def` | dequeue : A Returns the first element in the queue, and removes this element from the queue.
`override def` | enqueue (elems : A*) : Unit Adds all elements to the queue.
`override def` | equals (that : Any) : Boolean Checks if two queues are structurally identical.
`override def` | front : A Returns the first element in the queue, or throws an error if there is no element contained in the queue.
`override def` | hashCode : Int The hashCode method always yields an error, since it is not safe to use mutable queues as keys in hash tables.
`override def` | isEmpty : Boolean Checks if the queue is empty.
`override def` | toString : java.lang.String Returns a textual representation of a queue as a string.

Methods inherited from Queue
dequeueFirst, dequeueAll, clone

Methods inherited from MutableList
length, apply, get, prependElem, appendElem, reset, elements, last, toList, stringPrefix

Methods inherited from Seq
lengthCompare, size, concat, lastOption, headOption, ++, isDefinedAt, lastIndexOf, map, flatMap, filter, take, drop, slice, takeWhile, dropWhile, reverse, contains, subseq, toArray, projection, equalsWith, startsWith, endsWith, indexOf, containsSlice

Methods inherited from Iterable
partition, foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toStream, mkString, mkString, mkString, addString, addString, copyToArray, hasDefiniteSize

Methods inherited from PartialFunction
orElse, andThen

Methods inherited from Function1
compose

Methods inherited from AnyRef
getClass, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized

Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf

Method Details

`override` `def` isEmpty : Boolean

  Checks if the queue is empty.

Returns
  true, iff there is no element in the queue.

Overrides
  Queue.isEmpty

`override` `def` +=(elem : A) : Unit

  Inserts a single element at the end of the queue.

Parameters
  `elem -` the element to insert

Overrides
  Queue.+=

`override` `def` ++=(iter : Iterable[A]) : Unit

  Adds all elements provided by an `Iterable` object at the end of the queue. The elements are prepended in the order they are given out by the iterator.

Parameters
  `iter -` an iterable object

Overrides
  Queue.++=

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

  Adds all elements provided by an iterator at the end of the queue. The elements are prepended in the order they are given out by the iterator.

Parameters
  `it -` an iterator

Overrides
  Queue.++=

`override` `def` enqueue(elems : A*) : Unit

  Adds all elements to the queue.

Parameters
  `elems -` the elements to add.

Overrides
  Queue.enqueue

`override` `def` dequeue : A

  Returns the first element in the queue, and removes this element from the queue.

Returns
  the first element of the queue.

Overrides
  Queue.dequeue

`override` `def` front : A

  Returns the first element in the queue, or throws an error if there is no element contained in the queue.

Returns
  the first element.

Overrides
  Queue.front

`override` `def` clear : Unit

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

Overrides
  Queue.clear

`override` `def` equals(that : Any) : Boolean

  Checks if two queues are structurally identical.

Returns
  true, iff both queues contain the same sequence of elements.

Overrides
  Queue.equals

`override` `def` hashCode : Int

  The hashCode method always yields an error, since it is not safe to use mutable queues as keys in hash tables.

Returns
  never.

Overrides
  Queue.hashCode

`override` `def` toString : java.lang.String

  Returns a textual representation of a queue as a string.

Returns
  the string representation of this queue.

Overrides
  Queue.toString