langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java
equal
deleted
inserted
replaced
77 * @param attrName name of the attribute |
77 * @param attrName name of the attribute |
78 * @param attrValue value of the attribute |
78 * @param attrValue value of the attribute |
79 */ |
79 */ |
80 public void addAttr(HtmlAttr attrName, String attrValue) { |
80 public void addAttr(HtmlAttr attrName, String attrValue) { |
81 if (attrs.isEmpty()) |
81 if (attrs.isEmpty()) |
82 attrs = new LinkedHashMap<HtmlAttr,String>(3); |
82 attrs = new LinkedHashMap<>(3); |
83 attrs.put(nullCheck(attrName), escapeHtmlChars(attrValue)); |
83 attrs.put(nullCheck(attrName), escapeHtmlChars(attrValue)); |
84 } |
84 } |
85 |
85 |
86 public void setTitle(Content body) { |
86 public void setTitle(Content body) { |
87 addAttr(HtmlAttr.TITLE, stripHtml(body)); |
87 addAttr(HtmlAttr.TITLE, stripHtml(body)); |
107 addContent(content); |
107 addContent(content); |
108 } |
108 } |
109 } |
109 } |
110 else if (tagContent == HtmlTree.EMPTY || tagContent.isValid()) { |
110 else if (tagContent == HtmlTree.EMPTY || tagContent.isValid()) { |
111 if (content.isEmpty()) |
111 if (content.isEmpty()) |
112 content = new ArrayList<Content>(); |
112 content = new ArrayList<>(); |
113 content.add(tagContent); |
113 content.add(tagContent); |
114 } |
114 } |
115 } |
115 } |
116 |
116 |
117 /** |
117 /** |