mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-07 06:08:52 +00:00
VrsProvider: Use generic type inference for constructing objects.
This commit is contained in:
parent
49f6572fe4
commit
f5c475cf0b
1 changed files with 3 additions and 3 deletions
|
@ -460,11 +460,11 @@ public class VrsProvider extends AbstractNetworkProvider {
|
||||||
return new QueryDeparturesResult(header, QueryDeparturesResult.Status.INVALID_STATION);
|
return new QueryDeparturesResult(header, QueryDeparturesResult.Status.INVALID_STATION);
|
||||||
}
|
}
|
||||||
for (int iStation = 0; iStation < timetable.length(); iStation++) {
|
for (int iStation = 0; iStation < timetable.length(); iStation++) {
|
||||||
final List<Departure> departures = new ArrayList<Departure>();
|
final List<Departure> departures = new ArrayList<>();
|
||||||
final JSONObject station = timetable.getJSONObject(iStation);
|
final JSONObject station = timetable.getJSONObject(iStation);
|
||||||
final Location location = parseLocationAndPosition(station.getJSONObject("stop")).location;
|
final Location location = parseLocationAndPosition(station.getJSONObject("stop")).location;
|
||||||
final JSONArray events = station.getJSONArray("events");
|
final JSONArray events = station.getJSONArray("events");
|
||||||
final List<LineDestination> lines = new ArrayList<LineDestination>();
|
final List<LineDestination> lines = new ArrayList<>();
|
||||||
// for all departures
|
// for all departures
|
||||||
for (int iEvent = 0; iEvent < events.length(); iEvent++) {
|
for (int iEvent = 0; iEvent < events.length(); iEvent++) {
|
||||||
final JSONObject event = events.getJSONObject(iEvent);
|
final JSONObject event = events.getJSONObject(iEvent);
|
||||||
|
@ -518,7 +518,7 @@ public class VrsProvider extends AbstractNetworkProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void queryLinesForStation(String stationId, List<LineDestination> lineDestinations) throws IOException {
|
private void queryLinesForStation(String stationId, List<LineDestination> lineDestinations) throws IOException {
|
||||||
Set<String> lineNumbersAlreadyKnown = new HashSet<String>();
|
Set<String> lineNumbersAlreadyKnown = new HashSet<>();
|
||||||
for (LineDestination lineDestionation : lineDestinations) {
|
for (LineDestination lineDestionation : lineDestinations) {
|
||||||
lineNumbersAlreadyKnown.add(lineDestionation.line.label);
|
lineNumbersAlreadyKnown.add(lineDestionation.line.label);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue