Package com.cta4j.train
Interface TrainApi.Builder
- Enclosing interface:
TrainApi
public static interface TrainApi.Builder
Builder for constructing
TrainApi instances.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a configuredTrainApiinstance.Sets the API host to use for requests.stationsUrl(String stationsUrl) Sets the URL to fetch station data from.
-
Method Details
-
host
Sets the API host to use for requests.If not specified, the default CTA Train Tracker API host is used.
- Parameters:
host- the API host- Returns:
- this builder instance
-
stationsUrl
Sets the URL to fetch station data from.If not specified, the default URL for station data is used.
- Parameters:
stationsUrl- the URL for station data- Returns:
- this builder instance
-
build
TrainApi build()Builds a configuredTrainApiinstance.- Returns:
- a new
TrainApi
-