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
public static final class CurrentlyPlayingContext.Builder extends AbstractModelObject.Builder
Builder class for buildingCurrentlyPlayingContextinstances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
setDevice
public CurrentlyPlayingContext.Builder setDevice(Device device)
The active device setter.- Parameters:
device- The device that is currently active.- Returns:
- A
CurrentlyPlayingContext.Builder.
-
setRepeat_state
public CurrentlyPlayingContext.Builder setRepeat_state(String repeat_state)
The repeat state setter.- Parameters:
repeat_state- The repeat state.- Returns:
- A
CurrentlyPlayingContext.Builder.
-
setShuffle_state
public CurrentlyPlayingContext.Builder setShuffle_state(Boolean shuffle_state)
The shuffle state setter.- Parameters:
shuffle_state- If shuffle is on or off.- Returns:
- A
CurrentlyPlayingContext.Builder.
-
setContext
public CurrentlyPlayingContext.Builder setContext(Context context)
The playing context setter.- Parameters:
context- A Context Object. Can benull.- Returns:
- A
CurrentlyPlayingContext.Builder.
-
setTimestamp
public CurrentlyPlayingContext.Builder setTimestamp(Long timestamp)
The timestamp setter.- Parameters:
timestamp- Unix Millisecond Timestamp when data was fetched.- Returns:
- A
CurrentlyPlayingContext.Builder.
-
setProgress_ms
public CurrentlyPlayingContext.Builder setProgress_ms(Integer progress_ms)
The item progress setter.- Parameters:
progress_ms- Progress into the currently playing item. Can benull.- Returns:
- A
CurrentlyPlayingContext.Builder.
-
setIs_playing
public CurrentlyPlayingContext.Builder setIs_playing(Boolean is_playing)
The playing state setter.- Parameters:
is_playing- If something is currently playing.- Returns:
- A
CurrentlyPlayingContext.Builder.
-
setItem
public CurrentlyPlayingContext.Builder setItem(IPlaylistItem item)
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
public CurrentlyPlayingContext.Builder setActions(Actions actions)
The actions setter.- Parameters:
actions- AActionsobject which contains aDisallowsobject.- Returns:
- A
CurrentlyPlayingContext.Builder.
-
build
public CurrentlyPlayingContext build()
Description copied from interface:IModelObject.BuilderBuild 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.
-
-