public function getMaximumOccurrenceOf ($tag)
    {
        if (!preg_match(Field::TAG_RE, $tag)) {
            throw new InvalidArgumentException("Invalid field tag: {$tag}");
        }
        return array_reduce($this->getFields($tag),
                            function ($maxOccurrence, Field $field) {
                            if ($field->getOccurrence() > $maxOccurrence || $maxOccurrence === null) {
                                return $field->getOccurrence();
                            } else {
                                return $maxOccurrence;
                            }
                        }, null);
    }