Class representing a Queue
Kind: global class
- Queue
- .dequeue() ⇒
*
- .enqueue(object)
- .peek() ⇒
*
- .clear()
- .contains(object)
- .size() ⇒
Number
- .dequeue() ⇒
Removes and returns an object from the head of the Queue
Kind: instance method of Queue
Returns: *
- object from the head of the Queue
Adds an object to the tail of the Queue
Kind: instance method of Queue
Param | Type | Description |
---|---|---|
object | * |
to be added to the tail of the Queue |
Returns an object from the head of the Queue, but does not remove it
Kind: instance method of Queue
Returns: *
- object from the head of the Queue
Returns all objects from the Queue
Kind: instance method of Queue
Tests if an object in the Queue
Kind: instance method of Queue
Param | Type | Description |
---|---|---|
object | Boolean |
to look |
Return a size of the Queue
Kind: instance method of Queue
Returns: Number
- size of the Queue