|
Scala
1.2.0.1 |
|||
Queue
objects implement data structures that allow to
insert and retrieve elements in a first-in-first-out (FIFO) manner.
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. |
Methods inherited from java/lang/Object-class |
eq, finalize, getClass, notify, notifyAll, synchronized, wait, wait, wait |
Methods inherited from scala/Any-class |
!=, ==, asInstanceOf, isInstanceOf, match |
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/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 |
override def apply(n: Int): A
n
.
n
.
override def length: Int
override def isEmpty: Boolean
override def +=(elem: A): Unit
elem
-
the element to insert
override def ++=(iter: Iterable[A]): Unit
Iterable
object
at the end of the queue. The elements are prepended in the order they
are given out by the iterator.
iter
-
an iterable object
override def ++=(it: Iterator[A]): Unit
iter
-
an iterator
override def enqueue(elems: A*): Unit
elems
-
the elements to add.
override def dequeue: A
override def front: A
override def clear: Unit
override def elements: Iterator[A]
override def clone(): Queue[A]
|
Scala
1.2.0.1 |
|||