mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-20 17:29:51 +00:00
Rename NetworkProvider.autocompleteStations() to .suggestLocations() and change return type to SuggestLocationsResult.
This commit is contained in:
parent
d38d6e499b
commit
00b0f014ca
136 changed files with 809 additions and 745 deletions
|
@ -18,10 +18,10 @@
|
|||
package de.schildbach.pte;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.SuggestLocationsResult;
|
||||
|
||||
/**
|
||||
* @author Andreas Schildbach
|
||||
|
@ -44,7 +44,7 @@ public class VmsProvider extends AbstractEfaProvider
|
|||
public boolean hasCapabilities(final Capability... capabilities)
|
||||
{
|
||||
for (final Capability capability : capabilities)
|
||||
if (capability == Capability.AUTOCOMPLETE_ONE_LINE || capability == Capability.DEPARTURES || capability == Capability.TRIPS)
|
||||
if (capability == Capability.SUGGEST_LOCATIONS || capability == Capability.DEPARTURES || capability == Capability.TRIPS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
@ -68,7 +68,7 @@ public class VmsProvider extends AbstractEfaProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
public SuggestLocationsResult suggestLocations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
return xmlStopfinderRequest(new Location(LocationType.ANY, null, null, constraint.toString()));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue