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