Package com.cta4j.train.client.internal
Class TrainClientImpl
java.lang.Object
com.cta4j.train.client.internal.TrainClientImpl
- All Implemented Interfaces:
TrainClient
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.cta4j.train.client.TrainClient
TrainClient.Builder -
Method Summary
Modifier and TypeMethodDescriptiongetStationArrivals(String stationId) Retrieves aListof upcoming arrivals for a specific station.Retrieves information about a specific train by its run number.
-
Method Details
-
getStationArrivals
Description copied from interface:TrainClientRetrieves aListof upcoming arrivals for a specific station.- Specified by:
getStationArrivalsin interfaceTrainClient- Parameters:
stationId- the ID of the station- Returns:
- a
Listof upcoming arrivals for the specified station
-
getTrain
Description copied from interface:TrainClientRetrieves information about a specific train by its run number.- Specified by:
getTrainin interfaceTrainClient- Parameters:
run- the run number of the train- Returns:
- an
Optionalcontaining the train information if found, or an emptyOptionalif not found
-