Class PlayHistory.Builder
java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject.Builder
se.michaelthelin.spotify.model_objects.specification.PlayHistory.Builder
- All Implemented Interfaces:
IModelObject.Builder
- Enclosing class:
PlayHistory
Builder class for building
PlayHistory
instances.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a model object with the information set in the builder object.setContext
(Context context) The context setter.setPlayedAt
(Date playedAt) The played at date setter.The track setter.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setTrack
The track setter.- Parameters:
track
- The track the user listened to.- Returns:
- A
PlayHistory.Builder
.
-
setPlayedAt
The played at date setter.- Parameters:
playedAt
- The date and time the track was played.- Returns:
- A
PlayHistory.Builder
.
-
setContext
The context setter.- Parameters:
context
- The context the track was played from.- Returns:
- A
PlayHistory.Builder
.
-
build
Description copied from interface:IModelObject.Builder
Build a model object with the information set in the builder object.
The type of the model object and its methods depend on its corresponding implementation.- Returns:
- A model object.
-