in scala/collection/mutable
trait QueueProxy

trait QueueProxy[A]()
extends Queue[A]
with ScalaObject
with SeqProxy[A]

Queue objects implement data structures that allow to insert and retrieve elements in a first-in-first-out (FIFO) manner.
Author:
Matthias Zenger
Version:
1.1, 03/05/2004

Method Summary
override def ++=(iter: Iterable[A]): Unit
     Adds all elements provided by an Iterable object at the end of the queue.
override def ++=(it: Iterator[A]): Unit
     Adds all elements provided by an iterator at the end of the queue.
override def +=(elem: A): Unit
     Inserts a single element at the end of the queue.
override def apply(n: Int): A
     Access element number n.
override def clear: Unit
     Removes all elements from the queue.
override def clone(): Queue[A]
     This method clones the queue.
override def dequeue: A
     Returns the first element in the queue, and removes this element from the queue.
override def elements: Iterator[A]
     Returns an iterator over all elements on the queue.
override def enqueue(elems: A*): Unit
     Adds all elements to the queue.
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 isEmpty: Boolean
     Checks if the queue is empty.
override def length: Int
     Returns the length of this queue.
abstract def self: Queue[A]

Methods inherited from java/lang/Object-class
eq, finalize, getClass, ne, notify, notifyAll, synchronized, wait, wait, wait

Methods inherited from scala/Any-class
!=, ==, asInstanceOf, isInstanceOf, match

Methods inherited from scala/Iterable-class
concat

Methods inherited from scala/IterableProxy-class
/:, :\, exists, find, foldLeft, foldRight, forall, foreach, sameElements

Methods inherited from scala/Proxy-class
equals, hashCode, toString

Methods inherited from scala/ScalaObject-class
getScalaType

Methods inherited from scala/Seq-class
concat

Methods inherited from scala/SeqProxy-class
copyToArray, drop, indexOf, isDefinedAt, lastIndexOf, subseq, take, toList

Methods inherited from scala/collection/mutable/MutableList-class
appendElem, first, get, last, len, prependElem, reset, stringPrefix

Methods inherited from scala/collection/mutable/Queue-class
dequeueAll, dequeueFirst

Method Detail

self

  abstract def self: Queue[A]

apply

  override def apply(n: Int): A
Access element number n.
Returns:
the element at index n.

length

  override def length: Int
Returns the length of this queue.

isEmpty

  override def isEmpty: Boolean
Checks if the queue is empty.
Returns:
true, iff there is no element in the queue.

+=

  override def +=(elem: A): Unit
Inserts a single element at the end of the queue.
Parameters:
elem - the element to insert

++=

  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

++=

  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:
iter - an iterator

enqueue

  override def enqueue(elems: A*): Unit
Adds all elements to the queue.
Parameters:
elems - the elements to add.

dequeue

  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.

front

  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.

clear

  override def clear: Unit
Removes all elements from the queue. After this operation is completed, the queue will be empty.

elements

  override def elements: Iterator[A]
Returns an iterator over all elements on the queue.
Returns:
an iterator over all queue elements.

clone

  override def clone(): Queue[A]
This method clones the queue.
Returns:
a queue with the same elements.