Class CurrentlyPlayingContext.Builder
java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject.Builder
se.michaelthelin.spotify.model_objects.miscellaneous.CurrentlyPlayingContext.Builder
- All Implemented Interfaces:
IModelObject.Builder
- Enclosing class:
CurrentlyPlayingContext
Builder class for building
CurrentlyPlayingContext
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.The active device setter.setIs_playing
(Boolean is_playing) The playing state setter.setItem
(IPlaylistItem item) The currently playing item setter.setProgress_ms
(Integer progress_ms) The item progress setter.setRepeat_state
(String repeat_state) The repeat state setter.setShuffle_state
(Boolean shuffle_state) The shuffle state setter.setTimestamp
(Long timestamp) The timestamp setter.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setDevice
The active device setter.- Parameters:
device
- The device that is currently active.- Returns:
- A
CurrentlyPlayingContext.Builder
.
-
setRepeat_state
The repeat state setter.- Parameters:
repeat_state
- The repeat state.- Returns:
- A
CurrentlyPlayingContext.Builder
.
-
setShuffle_state
The shuffle state setter.- Parameters:
shuffle_state
- If shuffle is on or off.- Returns:
- A
CurrentlyPlayingContext.Builder
.
-
setContext
The playing context setter.- Parameters:
context
- A Context Object. Can benull
.- Returns:
- A
CurrentlyPlayingContext.Builder
.
-
setTimestamp
The timestamp setter.- Parameters:
timestamp
- Unix Millisecond Timestamp when data was fetched.- Returns:
- A
CurrentlyPlayingContext.Builder
.
-
setProgress_ms
The item progress setter.- Parameters:
progress_ms
- Progress into the currently playing item. Can benull
.- Returns:
- A
CurrentlyPlayingContext.Builder
.
-
setIs_playing
The playing state setter.- Parameters:
is_playing
- If something is currently playing.- Returns:
- A
CurrentlyPlayingContext.Builder
.
-
setItem
The currently playing item setter.- Parameters:
item
- If something is currently playing.- Returns:
- A
CurrentlyPlayingContext.Builder
.
-
setCurrentlyPlayingType
public CurrentlyPlayingContext.Builder setCurrentlyPlayingType(CurrentlyPlayingType currentlyPlayingType) The currently playing type setter.- Parameters:
currentlyPlayingType
- The type of the currently playing item.- Returns:
- A
CurrentlyPlayingContext.Builder
.
-
setActions
The actions setter.- Parameters:
actions
- AActions
object which contains aDisallows
object.- Returns:
- A
CurrentlyPlayingContext.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.
-