Class Queue
Class represeting FIFO data structure. The first element added to the queue
will be the first one to be removed.
-
BN\Collections\LinearDataStructure
-
BN\Collections\Queue
Methods summary
public
|
#
push( mixed $element )
Inserts element at the end of the queue
Inserts element at the end of the queue
Parameters
Throws
|
public
mixed
|
#
pop( )
Removes and returns first element of the queue. Returns null if the queue is
empty
Removes and returns first element of the queue. Returns null if the queue is
empty
Returns
mixed
|
public
mixed
|
#
peek( )
Returns first element of the queue (element is not removed from the queue).
Returns null if the queue is empty
Returns first element of the queue (element is not removed from the queue).
Returns null if the queue is empty
Returns
mixed
|
public
BN\Collections\Queue
|
#
__clone( )
Clones current queue
Returns
|