|
Scala 2
|
||
class
Queue
[ A ]
extends
java.lang.Object with
MutableList with
ScalaObjectQueue
objects implement data structures that allow to
insert and retrieve elements in a first-in-first-out (FIFO) manner.Constructor Summary | |
def
this
|
Def Summary | |
def
++=
( it : Iterator )
: scala.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. |
|
def
++=
( iter : Iterable )
: scala.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.
|
|
def
+=
( elem : A )
: scala.Unit
Inserts a single element at the end of the queue. |
|
def
clear
: scala.Unit
Removes all elements from the queue. After this operation is completed, the queue will be empty. |
|
override
|
def
clone
: Queue
This method clones the queue. |
def
dequeue
: A
Returns the first element in the queue, and removes this element from the queue. |
|
def
dequeueAll
( p : Function1 )
: Seq
Returns all elements in the queue which satisfy the given predicate, and removes those elements from the queue. |
|
def
dequeueFirst
( p : Function1 )
: Option
Returns the first element in the queue which satisfies the given predicate, and removes this element from the queue. |
|
def
enqueue
( elems : scala.<repeated> )
: scala.Unit
Adds all elements to the queue. |
|
override
|
def
equals
( that : scala.Any )
: scala.Boolean
Checks if two queues are structurally identical. |
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
: scala.Int
The hashCode method always yields an error, since it is not safe to use mutable queues as keys in hash tables. |
def
isEmpty
: scala.Boolean
Checks if the queue is empty. |
|
override
|
def
toString
: java.lang.String
Returns a textual representation of a queue as a string. |
Constructor Detail |
def
this
Def Detail |
def
++=
( it : Iterator ) : scala.Unit
def
++=
( iter : Iterable ) : scala.Unit
Iterable
object
at the end of the queue. The elements are prepended in the order they
are given out by the iterator.def
+=
( elem : A ) : scala.Unit
def
clear
: scala.Unit
def
clone
: Queue
def
dequeue
: A
def
dequeueAll
( p : Function1 ) : Seq
def
dequeueFirst
( p : Function1 ) : Option
def
enqueue
( elems : scala.<repeated> ) : scala.Unit
def
equals
( that : scala.Any ) : scala.Boolean
def
front
: A
def
hashCode
: scala.Int
def
isEmpty
: scala.Boolean
def
toString
: java.lang.String