📄 boardsmainpostnumcomparator.java
字号:
package com.laoer.bbscs.bean;
import java.util.*;
/**
* <p>Title: TianyiBBS</p>
*
* <p>Description: BBSCS</p>
*
* <p>Copyright: Copyright (c) 2006</p>
*
* <p>Company: Laoer.com</p>
*
* @author Laoer
* @version 7.0
*/
public class BoardsMainPostNumComparator
implements Comparator {
public BoardsMainPostNumComparator() {
}
/**
* Compares its two arguments for order.
*
* @param o1 the first object to be compared.
* @param o2 the second object to be compared.
* @return a negative integer, zero, or a positive integer as the first argument is less than, equal to,
* or greater than the second.
* @todo Implement this java.util.Comparator method
*/
public int compare(Object o1, Object o2) {
int num1 = ( (Board) o1).getMainPostNum();
int num2 = ( (Board) o2).getMainPostNum();
return num2 - num1;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -