MCPcopy Create free account
hub / github.com/diyhi/bbs / compare

Method compare

src/main/java/cms/component/topic/CommentComponent.java:178–192  ·  view source on GitHub ↗
(Reply o1, Reply o2)

Source from the content-addressed store, hash-verified

176 public void replySort(List<Reply> replyList){
177 Collections.sort(replyList, new Comparator<Reply>(){
178 @Override
179 public int compare(Reply o1, Reply o2) {
180 long s_1 = o1.getId();
181 long s_2 = o2.getId();
182 if(s_1 <s_2){
183 return -1;
184
185 }else{
186 if(s_1 == s_2){
187 return 0;
188 }else{
189 return 1;
190 }
191 }
192 }
193 });
194 }
195

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected