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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 320 by torben, Fri Sep 11 05:32:04 2009 UTC revision 321 by torben, Sun Sep 13 20:17:32 2009 UTC
# Line 65  public class DepartureBean implements Co Line 65  public class DepartureBean implements Co
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(":", ""));
68                  if (time1 > time2)                  
69                          return 1;                  //work correctly when clock wraps around at midnight
70                  else                  if (Math.abs(time1-time2) < 1200) {
71                          return -1;                          if (time1 > time2)
72                                    return 1;
73                            else
74                                    return -1;
75                    } else {
76                            if (time1 < time2)
77                                    return 1;
78                            else
79                                    return -1;
80    
81                    }
82                                    
83          }          }
84                    
# Line 80  public class DepartureBean implements Co Line 90  public class DepartureBean implements Co
90                          updStr = "&lt; 3 min";                          updStr = "&lt; 3 min";
91                          break;                          break;
92                  case 2:                  case 2:
93                          updStr = "< 3 min";                          updStr = "3-10 min";
94                          break;                          break;
95                  case 3:                  case 3:
96                          updStr = "&gt; 10 min";                          updStr = "&gt; 10 min";

Legend:
Removed from v.320  
changed lines
  Added in v.321

  ViewVC Help
Powered by ViewVC 1.1.20