public function setToleranceMode($toleranceMode)
    {
        if (in_array($toleranceMode, ToleranceMode::asArray(), true)) {
            $this->toleranceMode = $toleranceMode;
        } else {
            $msg = "The toleranceMode argument must be a value from the ToleranceMode enumeration, '" . $toleranceMode . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }