Class AudioFeatures.Builder
java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject.Builder
se.michaelthelin.spotify.model_objects.specification.AudioFeatures.Builder
- All Implemented Interfaces:
IModelObject.Builder
- Enclosing class:
AudioFeatures
Builder class for building
AudioFeatures
instances.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a model object with the information set in the builder object.setAcousticness
(Float acousticness) Set the acousticness of the audio features object to be built.setAnalysisUrl
(String analysisUrl) Set the Spotify Web API audio analysis endpoint URL of the audio features object to be built.setDanceability
(Float danceability) Set the danceability of the audio features object to be built.setDurationMs
(Integer durationMs) Set the duration in milliseconds of the audio features object to be built.Set the energy of the audio features object to be built.Set the Spotify track ID of the audio features object to be built.setInstrumentalness
(Float instrumentalness) Set the instrumentalness of the audio features object to be built.Set the key of the audio features object to be built.setLiveness
(Float liveness) Set the liveness of the audio features object to be built.setLoudness
(Float loudness) Set the loudness of the audio features object to be built.Set the mode of the audio features object to be built.setSpeechiness
(Float speechiness) Set the speechiness of the audio features object to be built.Set the tempo of the audio features object to be built.setTimeSignature
(Integer timeSignature) Set the time signature of the audio features object to be built.setTrackHref
(String trackHref) Set the track href to the Spotify Web API endpoint of the audio features object to be built.setType
(ModelObjectType type) Set the type of the model object.Set the Spotify URI of the audio feature objects track to be built.setValence
(Float valence) Set the valence of the audio features object to be built.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setAcousticness
Set the acousticness of the audio features object to be built.- Parameters:
acousticness
- Acousticness value between 0.0 and 1.0.- Returns:
- An
AudioFeatures.Builder
.
-
setAnalysisUrl
Set the Spotify Web API audio analysis endpoint URL of the audio features object to be built.- Parameters:
analysisUrl
- Spotify Web API endpoint URL.- Returns:
- An
AudioFeatures.Builder
.
-
setDanceability
Set the danceability of the audio features object to be built.- Parameters:
danceability
- Danceability value between 0.0 and 1.0.- Returns:
- An
AudioFeatures.Builder
.
-
setDurationMs
Set the duration in milliseconds of the audio features object to be built.- Parameters:
durationMs
- Duration in milliseconds.- Returns:
- An
AudioFeatures.Builder
.
-
setEnergy
Set the energy of the audio features object to be built.- Parameters:
energy
- Energy value between 0.0 and 1.0.- Returns:
- An
AudioFeatures.Builder
.
-
setId
Set the Spotify track ID of the audio features object to be built.- Parameters:
id
- Spotify track ID.- Returns:
- An
AudioFeatures.Builder
.
-
setInstrumentalness
Set the instrumentalness of the audio features object to be built.- Parameters:
instrumentalness
- Instrumentalness value between 0.0 and 1.0.- Returns:
- An
AudioFeatures.Builder
.
-
setKey
Set the key of the audio features object to be built.- Parameters:
key
- Track key.- Returns:
- An
AudioFeatures.Builder
.
-
setLiveness
Set the liveness of the audio features object to be built.- Parameters:
liveness
- Liveness value between 0.0 and 1.0.- Returns:
- An
AudioFeatures.Builder
.
-
setLoudness
Set the loudness of the audio features object to be built.- Parameters:
loudness
- Loudness value between 0.0 and 1.0.- Returns:
- An
AudioFeatures.Builder
.
-
setMode
Set the mode of the audio features object to be built.- Parameters:
mode
- Track mode.- Returns:
- An
AudioFeatures.Builder
.
-
setSpeechiness
Set the speechiness of the audio features object to be built.- Parameters:
speechiness
- Speechiness value between 0.0 and 1.0.- Returns:
- An
AudioFeatures.Builder
.
-
setTempo
Set the tempo of the audio features object to be built.- Parameters:
tempo
- Tempo value in beats per minute.- Returns:
- An
AudioFeatures.Builder
.
-
setTimeSignature
Set the time signature of the audio features object to be built.- Parameters:
timeSignature
- Time signature of the track.- Returns:
- An
AudioFeatures.Builder
.
-
setTrackHref
Set the track href to the Spotify Web API endpoint of the audio features object to be built.- Parameters:
trackHref
- Spotify Web API endpoint URL.- Returns:
- An
AudioFeatures.Builder
.
-
setType
Set the type of the model object. In this case "audio_features".- Parameters:
type
- TheModelObjectType
.- Returns:
- An
AudioFeatures.Builder
.
-
setUri
Set the Spotify URI of the audio feature objects track to be built.- Parameters:
uri
- The Spotify track URI.- Returns:
- An
AudioFeatures.Builder
.
-
setValence
Set the valence of the audio features object to be built.- Parameters:
valence
- Valence value between 0.0 and 1.0.- Returns:
- An
AudioFeatures.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.
-