/** * Creates a new decorator for a sorted bag which is bounded. * * @param \blaze\collections\bag\SortedBag $bag The decorated bag * @param int $maxCount The maximal size */ public function __construct(SortedBag $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\SortedBag $bag The decorated sorted bag * @param \blaze\collections\TypeChecker $typeChecker The type checker */ public function __construct(\blaze\collections\bag\SortedBag $bag, \blaze\collections\TypeChecker $typeChecker) { parent::__construct($bag); $this->typeChecker = $typeChecker; }