コード例 #1
0
 /**
  * Creates a new decorator for a collection which is bounded.
  *
  * @param \blaze\collections\Collection $collection The decorated collection
  * @param int $maxCount The maximal size
  */
 public function __construct(\blaze\collections\Collection $collection, $maxCount)
 {
     parent::__construct($collection);
     $this->maxCount = $maxCount;
 }
コード例 #2
0
 /**
  * Creates a decorator over the given collection with the given typeChecker to check the type of values.
  *
  * @param \blaze\collections\Collection $collection The decorated collection
  * @param \blaze\collections\TypeChecker $typeChecker The type checker
  */
 public function __construct(\blaze\collections\Collection $collection, \blaze\collections\TypeChecker $typeChecker)
 {
     parent::__construct($collection);
     $this->typeChecker = $typeChecker;
 }
コード例 #3
0
 /**
  * Implementations must call this constructor for initialization.
  *
  * @param \blaze\collections\SortedCollection $collection The decorated collection.
  */
 public function __construct(\blaze\collections\SortedCollection $collection)
 {
     parent::__construct($collection);
     $this->sortedCollection = $collection;
 }