示例#1
0
  public void hideNode(Set<Integer> hideSet) {
    if (comment != null) {
      hideSet.add(comment.getId());
    }

    for (CommentNode child : childs) {
      child.hideNode(hideSet);
    }
  }
示例#2
0
  public void hideIgnored(Set<Integer> hideSet, Set<Integer> ignoreList) {
    if (comment != null) {
      if (comment.isIgnored(ignoreList)) {
        hideNode(hideSet);
      }
    }

    if (comment == null || !hideSet.contains(comment.getId())) {
      for (CommentNode child : childs) {
        child.hideIgnored(hideSet, ignoreList);
      }
    }
  }
示例#3
0
  public void hideAnonymous(UserDao userDao, Set<Integer> hideSet)
      throws SQLException, UserNotFoundException {
    if (comment != null) {
      User commentAuthor = userDao.getUserCached(comment.getUserid());

      if (commentAuthor.isAnonymousScore()) {
        hideNode(hideSet);
      }
    }

    if (comment == null || !hideSet.contains(comment.getId())) {
      for (CommentNode child : childs) {
        child.hideAnonymous(userDao, hideSet);
      }
    }
  }