Home | History | Annotate | Download | only in comments

Lines Matching refs:comment

35     private final TreeSet<Comment> comments = new TreeSet<>(NODE_BY_BEGIN_POSITION);
40 public CommentsCollection(Collection<Comment> commentsToCopy) {
46 .filter(comment -> comment instanceof LineComment)
47 .map(comment -> (LineComment) comment)
53 .filter(comment -> comment instanceof BlockComment)
54 .map(comment -> (BlockComment) comment)
60 .filter(comment -> comment instanceof JavadocComment)
61 .map(comment -> (JavadocComment) comment)
65 public void addComment(Comment comment) {
66 comments.add(comment);
69 public boolean contains(Comment comment) {
70 for (Comment c : getComments()) {
73 if (c.getBegin().line == comment.getBegin().line &&
74 c.getBegin().column == comment.getBegin().column &&
75 c.getEnd().line == comment.getEnd().line &&
76 Math.abs(c.getEnd().column - comment.getEnd().column) < 2) {
83 public TreeSet<Comment> getComments() {
95 .filter(comment -> !other.contains(comment))