- StopsFindersByNameRecursionHelper.RunningInstance = new AsyncStopsFinderByName(StopsFindersByName[StopsFindersByNameRecursionHelper.getPos()], query, new AsyncStopsFinderByNameCallbackImplementation()).execute();
+ StopsFindersByNameRecursionHelper.RunningInstance = new AsyncStopsFinderByName(StopsFindersByName[StopsFindersByNameRecursionHelper.getPos()], query, new AsyncStopsFinderByNameCallbackImplementation(), stopsDB).execute();
}
private class AsyncStopsFinderByNameCallbackImplementation implements AsyncStopsFinderByName.AsyncStopsFinderByNameCallback {
public void call(List<Stop> stops, Fetcher.result res, String query) {
// create new task, run it, store the running instance. Don't try to reorder these calls even though it's unreadable, trust me.
ArrivalFetchersRecursionHelper.RunningInstance = new AsyncArrivalsFetcherAll(ArrivalFetchers[ArrivalFetchersRecursionHelper.getPos()], busStopID, new AsyncArrivalsFetcherAllCallbackImplementation()).execute();
}
private class AsyncArrivalsFetcherAllCallbackImplementation implements AsyncArrivalsFetcherAll.AsyncArrivalsFetcherAllCallback {
public void call(Palina p, Fetcher.result res, String stopID) {
+ private final @Nullable List<String> routesThatStopHere;
+
+ /**
+ * Hey, look, method overloading!
+ */
+ public Stop(final @NonNull String name, final @NonNull String ID, @Nullable final String location, @Nullable final Route.Type type, @Nullable final List<String> routesThatStopHere) {