private boolean commentsMatch(Comment oldC, Comment newC) { if (oldC == null && newC == null) return true; if (oldC == null || newC == null) return false; return oldC.equals(newC); }
private boolean listContains(List<Comment>list, Comment comment) { for (Comment c : list) if (c.equals(comment)) return true; return false; }