Skip to content

Commit 06a9a6f

Browse files
committedMay 28, 2015
Resolved warnings
1 parent fc88e3a commit 06a9a6f

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed
 

‎src/it/polito/tdp/babs/db/BabsDAO.java

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import it.polito.tdp.babs.model.Station;
44
import it.polito.tdp.babs.model.Trip;
55

6-
import java.awt.SecondaryLoop;
76
import java.sql.Connection;
87
import java.sql.PreparedStatement;
98
import java.sql.ResultSet;

‎src/it/polito/tdp/babs/model/Station.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import java.time.LocalDate;
44

5-
public class Station implements Comparable {
5+
public class Station implements Comparable<Station> {
66

77
private int stationID ;
88
private String name ;
@@ -107,9 +107,9 @@ public String toString() {
107107
}
108108

109109
@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 ;
113113
}
114114

115115

0 commit comments

Comments
 (0)
Please sign in to comment.