Class CurrentlyPlaying.Builder
java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject.Builder
se.michaelthelin.spotify.model_objects.miscellaneous.CurrentlyPlaying.Builder
- All Implemented Interfaces:
IModelObject.Builder
- Enclosing class:
CurrentlyPlaying
Builder class for building
CurrentlyPlaying
instances.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a model object with the information set in the builder object.setActions
(Actions actions) The actions setter.setContext
(Context context) The playing context setter.setCurrentlyPlayingType
(CurrentlyPlayingType currentlyPlayingType) The currently playing type setter.setIs_playing
(Boolean is_playing) The playing state setter.setItem
(IPlaylistItem item) The currently playing item setter.setProgress_ms
(Integer progress_ms) The current track progress setter.setTimestamp
(Long timestamp) The timestamp setter.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setContext
The playing context setter.- Parameters:
context
- The context the track was played from. Can benull
.- Returns:
- A
CurrentlyPlaying.Builder
.
-
setTimestamp
The timestamp setter.- Parameters:
timestamp
- Unix Millisecond Timestamp when data was fetched.- Returns:
- A
CurrentlyPlaying.Builder
.
-
setProgress_ms
The current track progress setter.- Parameters:
progress_ms
- Progress into the currently playing track. Can benull
.- Returns:
- A
CurrentlyPlaying.Builder
.
-
setIs_playing
The playing state setter.- Parameters:
is_playing
- If something is currently playing.- Returns:
- A
CurrentlyPlaying.Builder
.
-
setItem
The currently playing item setter.- Parameters:
item
- The currently playing item. Can benull
.- Returns:
- A
CurrentlyPlaying.Builder
.
-
setCurrentlyPlayingType
The currently playing type setter.- Parameters:
currentlyPlayingType
- The type of the currently playing item.- Returns:
- A
CurrentlyPlaying.Builder
.
-
setActions
The actions setter.- Parameters:
actions
- AActions
object which contains aDisallows
object.- Returns:
- A
CurrentlyPlaying.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.
-