class Tag {

    public static Tag valueOf(String tagName) {
        Validate.notNull(tagName);
        Tag tag = tags.get(tagName);

        if (tag == null) {
            tagName = tagName.trim().toLowerCase();
            Validate.notEmpty(tagName);
            tag = tags.get(tagName);

            if (tag == null) {
                // not defined: create default; go anywhere, do anything! (incl be inside a <p>)
                tag = new Tag(tagName);
                tag.isBlock = false;
                tag.canContainBlock = true;
            }
        }
        return tag;
    }

    private  Tag(String tagName);

}