File tree 2 files changed +4
-5
lines changed
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 3
3
import it .polito .tdp .babs .model .Station ;
4
4
import it .polito .tdp .babs .model .Trip ;
5
5
6
- import java .awt .SecondaryLoop ;
7
6
import java .sql .Connection ;
8
7
import java .sql .PreparedStatement ;
9
8
import java .sql .ResultSet ;
Original file line number Diff line number Diff line change 2
2
3
3
import java .time .LocalDate ;
4
4
5
- public class Station implements Comparable {
5
+ public class Station implements Comparable < Station > {
6
6
7
7
private int stationID ;
8
8
private String name ;
@@ -107,9 +107,9 @@ public String toString() {
107
107
}
108
108
109
109
@ Override
110
- public int compareTo (Object other ) {
111
- // return this.name.compareTo((Station) other.getName()) ;
112
- return (( Station ) other ) .stationID - this .stationID ;
110
+ public int compareTo (Station other ) {
111
+ // return this.name.compareTo(other.getName()) ;
112
+ return other .stationID - this .stationID ;
113
113
}
114
114
115
115
You can’t perform that action at this time.
0 commit comments