Subversion Repositories SmartDukaan

Rev

Rev 8438 | Rev 8440 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8438 Rev 8439
Line 3... Line 3...
3
import java.util.Comparator;
3
import java.util.Comparator;
4
 
4
 
5
public class NotMovingComparator implements Comparator<ExcelRow> {
5
public class NotMovingComparator implements Comparator<ExcelRow> {
6
	@Override
6
	@Override
7
	public int compare(ExcelRow  o1, ExcelRow o2) {
7
	public int compare(ExcelRow  o1, ExcelRow o2) {
8
		if (o1.getAVERAGE_SALE() > o2.getAVERAGE_SALE()) {
8
		if (o1.getCURRENT_STOCK_FBA() < o1.getCURRENT_STOCK_FBA()) {
9
			return -1;
9
			return -1;
10
		} else if (o1.getAVERAGE_SALE() < o2.getAVERAGE_SALE()) {
10
		} else if (o1.getAVERAGE_SALE() > o2.getAVERAGE_SALE()) {
11
			return 1;
11
			return 1;
12
		}
12
		}
13
		return 0;
13
		return 0;
14
	}
14
	}
15
}
15
}