/[projects]/android/TrainInfo/src/dk/thoerup/traininfo/provider/DebugProvider.java
ViewVC logotype

Diff of /android/TrainInfo/src/dk/thoerup/traininfo/provider/DebugProvider.java

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

revision 391 by torben, Sat Oct 3 10:55:43 2009 UTC revision 835 by torben, Fri Jun 11 14:05:24 2010 UTC
# Line 12  import dk.thoerup.traininfo.TimetableBea Line 12  import dk.thoerup.traininfo.TimetableBea
12  public class DebugProvider implements DepartureProvider, StationProvider, TimetableProvider {  public class DebugProvider implements DepartureProvider, StationProvider, TimetableProvider {
13    
14          @Override          @Override
15          public boolean lookupDepartures(int station) {          public boolean lookupDepartures(int station, boolean arrival) {
16                  return true;                  return true;
17          }                }      
18                    
19          @Override          @Override
20          public List<DepartureBean> getDepartures(int station) {          public List<DepartureBean> getDepartures(int station, boolean arrival) {
21                  List<DepartureBean> list = new ArrayList<DepartureBean>();                  List<DepartureBean> list = new ArrayList<DepartureBean>();
22                                    
23                  DepartureBean departure = new DepartureBean();                  DepartureBean departure = new DepartureBean();
# Line 63  public class DebugProvider implements De Line 63  public class DebugProvider implements De
63                  station.setDistance(1700);                                station.setDistance(1700);              
64                  station.setId(1);                  station.setId(1);
65                  station.setLatitude(56.0);                  station.setLatitude(56.0);
66                    station.setLongitude(10.0);            
67                    station.setRegional(true);
68                    stations.add(station);
69                    
70                    station = new StationBean();
71                    station.setName("Gåserød");          
72                    station.setDistance(5300);              
73                    station.setId(2);
74                    station.setLatitude(58.0);
75                  station.setLongitude(10.0);                  station.setLongitude(10.0);
76                    station.setRegional(true);
77                    stations.add(station);
78                                    
79                    station = new StationBean();
80                    station.setName("Pladerballe");        
81                    station.setDistance(15600);            
82                    station.setId(3);
83                    station.setLatitude(52.0);
84                    station.setLongitude(11.0);
85                    station.setRegional(true);
86                  stations.add(station);                  stations.add(station);
87                                    
88                  return stations;                  return stations;
# Line 76  public class DebugProvider implements De Line 94  public class DebugProvider implements De
94          }          }
95                    
96          @Override          @Override
97          public boolean lookupStations(String name) {          public boolean lookupStationsByName(String name) {
98                    return true;
99            }
100            
101            
102    
103            @Override
104            public boolean lookupStationsByIds(String ids) {
105                  return true;                  return true;
106          }          }
107    
108          @Override          @Override
109          public List<TimetableBean> getTimetable(String trainID) {          public List<TimetableBean> getTimetable(String type, String trainID) {
110                  List<TimetableBean> timetables = new ArrayList<TimetableBean>();                  List<TimetableBean> timetables = new ArrayList<TimetableBean>();
111                                    
112                  TimetableBean timetable = new TimetableBean();                  TimetableBean timetable = new TimetableBean();
# Line 116  public class DebugProvider implements De Line 141  public class DebugProvider implements De
141          }          }
142    
143          @Override          @Override
144          public boolean lookupTimetable(String trainID) {          public boolean lookupTimetable(String type, String trainID) {
145                  return true;                  return true;
146          }          }
147    

Legend:
Removed from v.391  
changed lines
  Added in v.835

  ViewVC Help
Powered by ViewVC 1.1.20