public function override(array $format)
    {
        $vars = get_object_vars($this);

        foreach ($format as $key => $value) {
            if (!array_key_exists($key, $vars)) {
                throw new SwatException(
                    "Number formatting information " .
                        "contains invalid property {$key} and cannot override " .
                        "this number format."
                );
            }
        }

        $new_format = clone $this;

        foreach ($format as $key => $value) {
            if ($value !== null) {
                $new_format->$key = $value;
            }
        }

        return $new_format;
    }