Esempio n. 1
0
 /**
  * Creates a new decorator for a queue which is bounded.
  *
  * @param \blaze\collections\Queue $queue The decorated queue
  * @param int $maxCount The maximal size
  */
 public function __construct(\blaze\collections\Queue $queue, $maxCount)
 {
     parent::__construct($queue);
     $this->maxCount = $maxCount;
 }
Esempio n. 2
0
 /**
  * Creates a decorator over the given queue with the given typeChecker to check the type of values.
  *
  * @param \blaze\queues\Queue $queue The decorated queue
  * @param \blaze\collections\TypeChecker $typeChecker The type checker
  */
 public function __construct(\blaze\queues\Queue $queue, \blaze\collections\TypeChecker $typeChecker)
 {
     parent::__construct($queue);
     $this->typeChecker = $typeChecker;
 }
 public function __construct(\blaze\collections\queue\Deque $deque)
 {
     parent::__construct($deque);
     $this->deque = $deque;
 }