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 building
CurrentlyPlaying instances.-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
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.
-
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 track setter.- Parameters:
item- The currently playing track. Can benull.- Returns:
- A
CurrentlyPlaying.Builder.
-
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.
-