1 |
package dk.thoerup.traininfoservice.banedk; |
package dk.thoerup.traininfoservice.banedk; |
2 |
|
|
3 |
public class DepartureBean implements Comparable { |
public class DepartureBean implements Comparable<DepartureBean> { |
4 |
private String time; |
private String time; |
5 |
private int updated; |
private int updated; |
6 |
private String trainNumber; |
private String trainNumber; |
61 |
} |
} |
62 |
|
|
63 |
@Override |
@Override |
64 |
public int compareTo(Object arg0) { |
public int compareTo(DepartureBean otherBean) { |
|
DepartureBean otherBean = (DepartureBean) arg0; |
|
65 |
|
|
66 |
int time1 = Integer.parseInt(time.replace(":", "")); |
int time1 = Integer.parseInt(time.replace(":", "")); |
67 |
int time2 = Integer.parseInt(otherBean.time.replace(":", "")); |
int time2 = Integer.parseInt(otherBean.time.replace(":", "")); |