public final class Location extends Object
Station. The location data is used for multiple
results and therefore does not always contain each information / field available.
Location information are not 100% reliable as they are directly provided by the gas station owners.
Fields that are not available all time will be wrapped in Optional.
| Modifier and Type | Method and Description |
|---|---|
String |
getCity()
Returns the city of the
Station |
Optional<Double> |
getDistance()
Returns the distance to the position which is passed to the
StationListRequest. |
Optional<String> |
getHouseNumber()
Returns the house number of the
Station. |
double |
getLat()
Returns the latitude of the
Station |
double |
getLng()
Returns the longitude of the
Station |
Optional<State> |
getState()
Returns the state of the
Station. |
String |
getStreetName()
Returns the street name of the
Station |
Integer |
getZipCode()
Returns the zip code of the
Station |
public double getLat()
Stationpublic double getLng()
Stationpublic Optional<Double> getDistance()
StationListRequest.
Unavailable for StationDetailResult
public Optional<String> getHouseNumber()
Station.
Sometimes the station owners will put the house number inside the street name, so this information is not always available.
Copyright © 2017. All rights reserved.