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
public static final class CurrentlyPlaying.Builder extends AbstractModelObject.Builder
Builder class for buildingCurrentlyPlayinginstances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CurrentlyPlayingbuild()Build a model object with the information set in the builder object.CurrentlyPlaying.BuildersetActions(Actions actions)The actions setter.CurrentlyPlaying.BuildersetContext(Context context)The playing context setter.CurrentlyPlaying.BuildersetCurrentlyPlayingType(CurrentlyPlayingType currentlyPlayingType)The currently playing type setter.CurrentlyPlaying.BuildersetIs_playing(Boolean is_playing)The playing state setter.CurrentlyPlaying.BuildersetItem(IPlaylistItem item)The currently playing item setter.CurrentlyPlaying.BuildersetProgress_ms(Integer progress_ms)The current track progress setter.CurrentlyPlaying.BuildersetTimestamp(Long timestamp)The timestamp setter.
-
-
-
Method Detail
-
setContext
public CurrentlyPlaying.Builder setContext(Context context)
The playing context setter.- Parameters:
context- The context the track was played from. Can benull.- Returns:
- A
CurrentlyPlaying.Builder.
-
setTimestamp
public CurrentlyPlaying.Builder setTimestamp(Long timestamp)
The timestamp setter.- Parameters:
timestamp- Unix Millisecond Timestamp when data was fetched.- Returns:
- A
CurrentlyPlaying.Builder.
-
setProgress_ms
public CurrentlyPlaying.Builder setProgress_ms(Integer progress_ms)
The current track progress setter.- Parameters:
progress_ms- Progress into the currently playing track. Can benull.- Returns:
- A
CurrentlyPlaying.Builder.
-
setIs_playing
public CurrentlyPlaying.Builder setIs_playing(Boolean is_playing)
The playing state setter.- Parameters:
is_playing- If something is currently playing.- Returns:
- A
CurrentlyPlaying.Builder.
-
setItem
public CurrentlyPlaying.Builder setItem(IPlaylistItem item)
The currently playing item setter.- Parameters:
item- The currently playing item. Can benull.- Returns:
- A
CurrentlyPlaying.Builder.
-
setCurrentlyPlayingType
public CurrentlyPlaying.Builder setCurrentlyPlayingType(CurrentlyPlayingType currentlyPlayingType)
The currently playing type setter.- Parameters:
currentlyPlayingType- The type of the currently playing item.- Returns:
- A
CurrentlyPlaying.Builder.
-
setActions
public CurrentlyPlaying.Builder setActions(Actions actions)
The actions setter.- Parameters:
actions- AActionsobject which contains aDisallowsobject.- Returns:
- A
CurrentlyPlaying.Builder.
-
build
public CurrentlyPlaying 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.
-
-