/[projects]/android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureBean.java
ViewVC logotype

Annotation of /android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureBean.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 307 - (hide annotations) (download)
Thu Sep 10 18:11:53 2009 UTC (14 years, 8 months ago) by torben
File size: 1646 byte(s)
Finish new bane.dk screen-scraper
1 torben 305 package dk.thoerup.traininfoservice.banedk;
2    
3 torben 307 public class DepartureBean implements Comparable {
4 torben 305 private String time;
5     private int updated;
6     private String trainNumber;
7     private String destination;
8     private String origin;
9     private String location;
10     private String status;
11     private String note;
12    
13    
14     public String getTime() {
15     return time;
16     }
17     public void setTime(String time) {
18     this.time = time;
19     }
20     public int getUpdated() {
21     return updated;
22     }
23     public void setUpdated(int updated) {
24     this.updated = updated;
25     }
26     public String getTrainNumber() {
27     return trainNumber;
28     }
29     public void setTrainNumber(String trainNumber) {
30     this.trainNumber = trainNumber;
31     }
32     public String getDestination() {
33     return destination;
34     }
35     public void setDestination(String destination) {
36     this.destination = destination;
37     }
38     public String getOrigin() {
39     return origin;
40     }
41     public void setOrigin(String origin) {
42     this.origin = origin;
43     }
44     public String getLocation() {
45     return location;
46     }
47     public void setLocation(String location) {
48     this.location = location;
49     }
50     public String getStatus() {
51     return status;
52     }
53     public void setStatus(String status) {
54     this.status = status;
55     }
56     public String getNote() {
57     return note;
58     }
59     public void setNote(String note) {
60     this.note = note;
61     }
62    
63 torben 307 @Override
64     public int compareTo(Object arg0) {
65     DepartureBean otherBean = (DepartureBean) arg0;
66    
67     int time1 = Integer.parseInt(time.replace(":", ""));
68     int time2 = Integer.parseInt(otherBean.time.replace(":", ""));
69     if (time1 > time2)
70     return 1;
71     else
72     return -1;
73    
74     }
75 torben 305
76 torben 307
77 torben 305 }

  ViewVC Help
Powered by ViewVC 1.1.20