/** * 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; }
/** * 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; }
/** * 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; }