summaryrefslogtreecommitdiffstats
path: root/server/src/org/jsoup/nodes/Comment.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/org/jsoup/nodes/Comment.java')
-rw-r--r--server/src/org/jsoup/nodes/Comment.java40
1 files changed, 25 insertions, 15 deletions
diff --git a/server/src/org/jsoup/nodes/Comment.java b/server/src/org/jsoup/nodes/Comment.java
index 37fd4368fa..6abe0e3066 100644
--- a/server/src/org/jsoup/nodes/Comment.java
+++ b/server/src/org/jsoup/nodes/Comment.java
@@ -1,45 +1,55 @@
package org.jsoup.nodes;
/**
- A comment node.
-
- @author Jonathan Hedley, jonathan@hedley.net */
+ * A comment node.
+ *
+ * @author Jonathan Hedley, jonathan@hedley.net
+ */
public class Comment extends Node {
private static final String COMMENT_KEY = "comment";
/**
- Create a new comment node.
- @param data The contents of the comment
- @param baseUri base URI
+ * Create a new comment node.
+ *
+ * @param data
+ * The contents of the comment
+ * @param baseUri
+ * base URI
*/
public Comment(String data, String baseUri) {
super(baseUri);
attributes.put(COMMENT_KEY, data);
}
+ @Override
public String nodeName() {
return "#comment";
}
/**
- Get the contents of the comment.
- @return comment content
+ * Get the contents of the comment.
+ *
+ * @return comment content
*/
public String getData() {
return attributes.get(COMMENT_KEY);
}
- void outerHtmlHead(StringBuilder accum, int depth, Document.OutputSettings out) {
- if (out.prettyPrint())
+ @Override
+ void outerHtmlHead(StringBuilder accum, int depth,
+ Document.OutputSettings out) {
+ if (out.prettyPrint()) {
indent(accum, depth, out);
- accum
- .append("<!--")
- .append(getData())
- .append("-->");
+ }
+ accum.append("<!--").append(getData()).append("-->");
}
- void outerHtmlTail(StringBuilder accum, int depth, Document.OutputSettings out) {}
+ @Override
+ void outerHtmlTail(StringBuilder accum, int depth,
+ Document.OutputSettings out) {
+ }
+ @Override
public String toString() {
return outerHtml();
}