public function setWithReplacement($withReplacement)
    {
        if (is_bool($withReplacement)) {
            $this->withReplacement = $withReplacement;
        } else {
            $msg = "WithReplacement must be a boolean, '" . gettype($withReplacement) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }