Overview

Namespaces

  • BN
    • Collections
    • Compiler
      • Grammar
      • Parser
        • Operator
        • Token
      • Postfix
        • Operands
        • Operator
        • Token
      • Scanner
        • Converter
      • Token
  • Demo
  • None

Classes

  • LinearDataStructure
  • Queue
  • Stack

Exceptions

  • NullArgumentException
  • Overview
  • Namespace
  • Class
  • Tree

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
Extended by BN\Collections\Queue
Namespace: BN\Collections
Located at lib/BN/Collections/Queue.php
Methods summary
public
# push( mixed $element )

Inserts element at the end of the queue

Inserts element at the end of the queue

Parameters

$element
mixed
$element

Throws

BN\Collections\NullArgumentException
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

Clones current queue

Returns

BN\Collections\Queue
Methods inherited from BN\Collections\LinearDataStructure
checkIfElementIsNotNull(), clear(), isEmpty(), size()
Properties inherited from BN\Collections\LinearDataStructure
$data
BN-PHP - Big Number data type for PHP API documentation generated by ApiGen 2.8.0