Class CurrentlyPlaying.Builder
- java.lang.Object
-
- com.wrapper.spotify.model_objects.AbstractModelObject.Builder
-
- com.wrapper.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.BuildersetContext(Context context)The playing context setter.CurrentlyPlaying.BuildersetIs_playing(Boolean is_playing)The playing state setter.CurrentlyPlaying.BuildersetItem(Track item)The currently playing track 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(Track item)
The currently playing track setter.- Parameters:
item- The currently playing track. Can benull.- 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.
-
-