public final class Station extends Object
If the station is closed (isOpen = false), no gas prices will be available.
Price information are pretty reliable, but most of the String fields are not as they are provided uncontrolled by the gas stations.
Therefore, the name and brand data might not be consistent. E.g., "JET" can also be returned as "Jet" or "jet".
Fields that are not available all time will be wrapped in Optional.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Optional<String> |
getBrand()
Returns the stations brand.
|
Optional<GasPrices> |
getGasPrices()
Returns the stations gas prices.
|
String |
getId()
Returns the stations unique ID
|
Location |
getLocation()
Returns the stations location data
|
Optional<String> |
getName()
Returns the stations name
|
Optional<List<OpeningTime>> |
getOpeningTimes()
Returns an unmodifyable list of opening times for the station.
|
Optional<List<String>> |
getOverridingOpeningTimes()
Returns an unmodifyable list of overriding opening times for the station.
|
Optional<Float> |
getPrice()
Returns the gas price for the requested
GasRequestType. |
int |
hashCode() |
boolean |
isOpen()
Determines whether the station is open
|
Optional<Boolean> |
isWholeDay()
Defines if the station is opened the whole day.
|
public String getId()
public Location getLocation()
public Optional<String> getBrand()
Sometimes this information is not available, which is mostly the case for gas stations in private ownership.
public boolean isOpen()
public Optional<GasPrices> getGasPrices()
Will only be available with StationListRequest if GasRequestType is set to ALL,
or StationDetailRequest
public Optional<List<OpeningTime>> getOpeningTimes()
Will only be available with StationDetailResult
public Optional<List<String>> getOverridingOpeningTimes()
Will only be available with StationDetailResult
public Optional<Boolean> isWholeDay()
public Optional<Float> getPrice()
GasRequestType.
Will only be available with StationListRequest if GasRequestType is set to E5, E10 or DIESEL
Copyright © 2017. All rights reserved.