Java Code Examples for com.socks.jiandan.model.Comment4FreshNews#getId()
The following examples show how to use
com.socks.jiandan.model.Comment4FreshNews#getId() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Request4FreshNewsCommentList.java From JianDan_OkHttpWithVolley with Apache License 2.0 | 6 votes |
private void getParenFreshNews(ArrayList<Comment4FreshNews> tempComments, ArrayList<Comment4FreshNews> comment4FreshNewses, int parentId) { for (Comment4FreshNews comment4FreshNews : comment4FreshNewses) { if (comment4FreshNews.getId() != parentId) continue; //找到了父评论 tempComments.add(comment4FreshNews); //父评论又有父评论 if (comment4FreshNews.getParentId() != 0 && comment4FreshNews.getParentComments() != null) { comment4FreshNews.setContent(getContentWithParent(comment4FreshNews.getContent())); tempComments.addAll(comment4FreshNews.getParentComments()); return; } //父评论没有父评论了 comment4FreshNews.setContent(getContentOnlySelf(comment4FreshNews.getContent())); } }
Example 2
Source File: Request4FreshNewsCommentList.java From JianDan with Apache License 2.0 | 6 votes |
private void getParenFreshNews(ArrayList<Comment4FreshNews> tempComments, ArrayList<Comment4FreshNews> comment4FreshNewses, int parentId) { for (Comment4FreshNews comment4FreshNews : comment4FreshNewses) { if (comment4FreshNews.getId() != parentId) continue; //找到了父评论 tempComments.add(comment4FreshNews); //父评论又有父评论 if (comment4FreshNews.getParentId() != 0 && comment4FreshNews.getParentComments() != null) { comment4FreshNews.setContent(getContentWithParent(comment4FreshNews.getContent())); tempComments.addAll(comment4FreshNews.getParentComments()); return; } //父评论没有父评论了 comment4FreshNews.setContent(getContentOnlySelf(comment4FreshNews.getContent())); } }
Example 3
Source File: FreshNewsCommentParser.java From JianDanRxJava with Apache License 2.0 | 6 votes |
private void getParenFreshNews(ArrayList<Comment4FreshNews> tempComments, ArrayList<Comment4FreshNews> comment4FreshNewses, int parentId) { for (Comment4FreshNews comment4FreshNews : comment4FreshNewses) { if (comment4FreshNews.getId() != parentId) continue; //找到了父评论 tempComments.add(comment4FreshNews); //父评论又有父评论 if (comment4FreshNews.getParentId() != 0 && comment4FreshNews.getParentComments() != null) { comment4FreshNews.setContent(getContentWithParent(comment4FreshNews.getContent())); tempComments.addAll(comment4FreshNews.getParentComments()); return; } //父评论没有父评论了 comment4FreshNews.setContent(getContentOnlySelf(comment4FreshNews.getContent())); } }
Example 4
Source File: FreshNewsCommentParser.java From JianDan_OkHttp with Apache License 2.0 | 6 votes |
private void getParenFreshNews(ArrayList<Comment4FreshNews> tempComments, ArrayList<Comment4FreshNews> comment4FreshNewses, int parentId) { for (Comment4FreshNews comment4FreshNews : comment4FreshNewses) { if (comment4FreshNews.getId() != parentId) continue; //找到了父评论 tempComments.add(comment4FreshNews); //父评论又有父评论 if (comment4FreshNews.getParentId() != 0 && comment4FreshNews.getParentComments() != null) { comment4FreshNews.setContent(getContentWithParent(comment4FreshNews.getContent())); tempComments.addAll(comment4FreshNews.getParentComments()); return; } //父评论没有父评论了 comment4FreshNews.setContent(getContentOnlySelf(comment4FreshNews.getContent())); } }
Example 5
Source File: Request4FreshNewsCommentList.java From JianDan_OkHttp with Apache License 2.0 | 6 votes |
private void getParenFreshNews(ArrayList<Comment4FreshNews> tempComments, ArrayList<Comment4FreshNews> comment4FreshNewses, int parentId) { for (Comment4FreshNews comment4FreshNews : comment4FreshNewses) { if (comment4FreshNews.getId() != parentId) continue; //找到了父评论 tempComments.add(comment4FreshNews); //父评论又有父评论 if (comment4FreshNews.getParentId() != 0 && comment4FreshNews.getParentComments() != null) { comment4FreshNews.setContent(getContentWithParent(comment4FreshNews.getContent())); tempComments.addAll(comment4FreshNews.getParentComments()); return; } //父评论没有父评论了 comment4FreshNews.setContent(getContentOnlySelf(comment4FreshNews.getContent())); } }