Class TrainClientImpl

java.lang.Object
com.cta4j.train.client.internal.TrainClientImpl
All Implemented Interfaces:
TrainClient

@Internal public final class TrainClientImpl extends Object implements TrainClient
  • Method Details

    • getStationArrivals

      public List<StationArrival> getStationArrivals(String stationId)
      Description copied from interface: TrainClient
      Retrieves a List of upcoming arrivals for a specific station.
      Specified by:
      getStationArrivals in interface TrainClient
      Parameters:
      stationId - the ID of the station
      Returns:
      a List of upcoming arrivals for the specified station
    • getTrain

      public Optional<Train> getTrain(String run)
      Description copied from interface: TrainClient
      Retrieves information about a specific train by its run number.
      Specified by:
      getTrain in interface TrainClient
      Parameters:
      run - the run number of the train
      Returns:
      an Optional containing the train information if found, or an empty Optional if not found