1 package be
.nikiroo
.gofetch
.data
;
3 import java
.util
.ArrayList
;
4 import java
.util
.Iterator
;
7 public class Comment
implements Iterable
<Comment
> {
12 private List
<String
> lines
;
13 private List
<Comment
> children
;
15 public Comment(String id
, String author
, String title
, String date
,
22 this.children
= new ArrayList
<Comment
>();
25 public void add(Comment comment
) {
26 children
.add(comment
);
29 public void addAll(List
<Comment
> comments
) {
30 children
.addAll(comments
);
36 public String
getId() {
43 public String
getAuthor() {
50 public String
getTitle() {
57 public String
getDate() {
64 public List
<String
> getContentLines() {
68 public boolean isEmpty() {
69 return children
.isEmpty() && lines
.isEmpty()
70 && ("" + author
+ title
).trim().isEmpty();
74 public Iterator
<Comment
> iterator() {
75 return children
.iterator();