Package com.cta4j.train.arrival.query
Class MapArrivalQuery.Builder
java.lang.Object
com.cta4j.train.arrival.query.MapArrivalQuery.Builder
- Enclosing class:
MapArrivalQuery
A builder for
MapArrivalQuery.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theMapArrivalQuery.Sets the train line to filter arrival information by.maxResults(Integer maxResults) Sets the maximum number of arrival information to return.
-
Constructor Details
-
Builder
Constructs aBuilder.- Parameters:
mapId- the ID of the map to retrieve arrival information for- Throws:
NullPointerException- ifmapIdisnull
-
-
Method Details
-
line
Sets the train line to filter arrival information by.- Parameters:
line- the train line- Returns:
- this
Builderinstance - Throws:
NullPointerException- iflineisnull
-
maxResults
Sets the maximum number of arrival information to return.- Parameters:
maxResults- the maximum number of arrival information- Returns:
- this
Builderinstance - Throws:
NullPointerException- ifmaxResultsisnullIllegalArgumentException- ifmaxResultsis not positive
-
build
Builds theMapArrivalQuery.- Returns:
- a new
MapArrivalQueryinstance
-