Package com.cta4j.train.location
Interface LocationsApi
@NullMarked
public interface LocationsApi
Provides access to location-related endpoints of the CTA Train Tracker API.
This API allows retrieval of train locations by line.
-
Method Summary
Modifier and TypeMethodDescriptiondefault List<TrainLocations> findAll()Retrieves train locations for all lines.default List<TrainLocations> findByLine(TrainLine line) Retrieves train locations for the specified line.findByLines(List<TrainLine> lines) Retrieves train locations for the specified lines.
-
Method Details
-
findByLines
Retrieves train locations for the specified lines.- Parameters:
lines- aListofTrainLines to filter the train locations by- Returns:
- a
ListofTrainLocationscorresponding to the provided lines, or an emptyListif no train locations are found for the specified lines
-
findByLine
Retrieves train locations for the specified line.- Parameters:
line- theTrainLineto filter the train locations by- Returns:
- a
ListofTrainLocationscorresponding to the provided line, or an emptyListif no train locations are found for the specified line
-
findAll
Retrieves train locations for all lines.- Returns:
- a
ListofTrainLocationsfor all lines, or an emptyListif no train locations are found
-