コード例 #1
0
ファイル: BoundedBag.php プロジェクト: robo47/BlazeFramework
 /**
  * Creates a new decorator for a bag which is bounded.
  *
  * @param \blaze\collections\Bag $bag The decorated bag
  * @param int $maxCount The maximal size
  */
 public function __construct(\blaze\collections\Bag $bag, $maxCount)
 {
     parent::__construct($bag);
     $this->maxCount = $maxCount;
 }
コード例 #2
0
ファイル: TypedBag.php プロジェクト: robo47/BlazeFramework
 /**
  * Creates a decorator over the given sorted bag with the given typeChecker to check the type of values.
  *
  * @param \blaze\collections\Bag $bag The decorated bag
  * @param \blaze\collections\TypeChecker $typeChecker The type checker
  */
 public function __construct(\blaze\collections\Bag $bag, \blaze\collections\TypeChecker $typeChecker)
 {
     parent::__construct($bag);
     $this->typeChecker = $typeChecker;
 }
コード例 #3
0
 /**
  * Implementations must call this constructor for initialization.
  *
  * @param \blaze\collections\bag\SortedBag $bag The decorated bag.
  */
 public function __construct(\blaze\collections\bag\SortedBag $bag)
 {
     parent::__construct($bag);
     $this->sortedBag = $bag;
 }