Package com.cta4j.bus.prediction.query
Class StopsPredictionsQuery.Builder
java.lang.Object
com.cta4j.bus.prediction.query.StopsPredictionsQuery.Builder
- Enclosing class:
StopsPredictionsQuery
A builder for
StopsPredictionsQuery.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theStopsPredictionsQuery.maxResults(Integer maxResults) Sets the maximum number of predictions to return.Sets theListof route IDs to filter predictions by.
-
Constructor Details
-
Builder
Constructs aBuilder.- Parameters:
stopIds- theListof stop IDs to retrieve predictions for- Throws:
NullPointerException- ifstopIdsor any of its elements arenull
-
-
Method Details
-
routeIds
Sets theListof route IDs to filter predictions by.- Parameters:
routeIds- theListof route IDs- Returns:
- this
Builderinstance - Throws:
NullPointerException- ifrouteIdsor any of its elements arenull
-
maxResults
Sets the maximum number of predictions to return.- Parameters:
maxResults- the maximum number of predictions- Returns:
- this
Builderinstance - Throws:
NullPointerException- ifmaxResultsisnullIllegalArgumentException- ifmaxResultsis not positive
-
build
Builds theStopsPredictionsQuery.- Returns:
- a new
StopsPredictionsQueryinstance
-