ScheduleComparator.java
951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.bsth.data.schedule;
import com.bsth.entity.realcontrol.ScheduleRealInfo;
import java.util.Comparator;
/**
*
* @ClassName: ScheduleComparator
* @Description: TODO(实际班次排序器)
* @author PanZhao
* @date 2016年8月15日 下午1:53:28
*
*/
public class ScheduleComparator {
/* public static class FCNO implements Comparator<ScheduleRealInfo>{
@Override
public int compare(ScheduleRealInfo s1, ScheduleRealInfo s2) {
return s1.getFcno() - s2.getFcno();
}
}*/
public static class FCSJ implements Comparator<ScheduleRealInfo>{
@Override
public int compare(ScheduleRealInfo s1, ScheduleRealInfo s2) {
return (int) (s1.getFcsjT() - s2.getFcsjT());
}
}
public static class DFSJ implements Comparator<ScheduleRealInfo>{
@Override
public int compare(ScheduleRealInfo s1, ScheduleRealInfo s2) {
return (int) (s1.getDfsjT() - s2.getDfsjT());
}
}
}