Class AudioFeatures.Builder
- java.lang.Object
-
- com.wrapper.spotify.model_objects.AbstractModelObject.Builder
-
- com.wrapper.spotify.model_objects.specification.AudioFeatures.Builder
-
- All Implemented Interfaces:
IModelObject.Builder
- Enclosing class:
- AudioFeatures
public static final class AudioFeatures.Builder extends AbstractModelObject.Builder
Builder class for buildingAudioFeaturesinstances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AudioFeaturesbuild()Build a model object with the information set in the builder object.AudioFeatures.BuildersetAcousticness(Float acousticness)Set the acousticness of the audio features object to be built.AudioFeatures.BuildersetAnalysisUrl(String analysisUrl)Set the Spotify Web API audio analysis endpoint URL of the audio features object to be built.AudioFeatures.BuildersetDanceability(Float danceability)Set the danceability of the audio features object to be built.AudioFeatures.BuildersetDurationMs(Integer durationMs)Set the duration in milliseconds of the audio features object to be built.AudioFeatures.BuildersetEnergy(Float energy)Set the energy of the audio features object to be built.AudioFeatures.BuildersetId(String id)Set the Spotify track ID of the audio features object to be built.AudioFeatures.BuildersetInstrumentalness(Float instrumentalness)Set the instrumentalness of the audio features object to be built.AudioFeatures.BuildersetKey(Integer key)Set the key of the audio features object to be built.AudioFeatures.BuildersetLiveness(Float liveness)Set the liveness of the audio features object to be built.AudioFeatures.BuildersetLoudness(Float loudness)Set the loudness of the audio features object to be built.AudioFeatures.BuildersetMode(Modality mode)Set the mode of the audio features object to be built.AudioFeatures.BuildersetSpeechiness(Float speechiness)Set the speechiness of the audio features object to be built.AudioFeatures.BuildersetTempo(Float tempo)Set the tempo of the audio features object to be built.AudioFeatures.BuildersetTimeSignature(Integer timeSignature)Set the time signature of the audio features object to be built.AudioFeatures.BuildersetTrackHref(String trackHref)Set the track href to the Spotify Web API endpoint of the audio features object to be built.AudioFeatures.BuildersetType(ModelObjectType type)Set the type of the model object.AudioFeatures.BuildersetUri(String uri)Set the Spotify URI of the audio feature objects track to be built.AudioFeatures.BuildersetValence(Float valence)Set the valence of the audio features object to be built.
-
-
-
Method Detail
-
setAcousticness
public AudioFeatures.Builder setAcousticness(Float acousticness)
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
public AudioFeatures.Builder setAnalysisUrl(String analysisUrl)
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
public AudioFeatures.Builder setDanceability(Float danceability)
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
public AudioFeatures.Builder setDurationMs(Integer durationMs)
Set the duration in milliseconds of the audio features object to be built.- Parameters:
durationMs- Duration in milliseconds.- Returns:
- An
AudioFeatures.Builder.
-
setEnergy
public AudioFeatures.Builder setEnergy(Float energy)
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
public AudioFeatures.Builder setId(String id)
Set the Spotify track ID of the audio features object to be built.- Parameters:
id- Spotify track ID.- Returns:
- An
AudioFeatures.Builder.
-
setInstrumentalness
public AudioFeatures.Builder setInstrumentalness(Float instrumentalness)
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
public AudioFeatures.Builder setKey(Integer key)
Set the key of the audio features object to be built.- Parameters:
key- Track key.- Returns:
- An
AudioFeatures.Builder.
-
setLiveness
public AudioFeatures.Builder setLiveness(Float liveness)
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
public AudioFeatures.Builder setLoudness(Float loudness)
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
public AudioFeatures.Builder setMode(Modality mode)
Set the mode of the audio features object to be built.- Parameters:
mode- Track mode.- Returns:
- An
AudioFeatures.Builder.
-
setSpeechiness
public AudioFeatures.Builder setSpeechiness(Float speechiness)
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
public AudioFeatures.Builder setTempo(Float tempo)
Set the tempo of the audio features object to be built.- Parameters:
tempo- Tempo value in beats per minute.- Returns:
- An
AudioFeatures.Builder.
-
setTimeSignature
public AudioFeatures.Builder setTimeSignature(Integer timeSignature)
Set the time signature of the audio features object to be built.- Parameters:
timeSignature- Time signature of the track.- Returns:
- An
AudioFeatures.Builder.
-
setTrackHref
public AudioFeatures.Builder setTrackHref(String trackHref)
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
public AudioFeatures.Builder setType(ModelObjectType type)
Set the type of the model object. In this case "audio_features".- Parameters:
type- TheModelObjectType.- Returns:
- An
AudioFeatures.Builder.
-
setUri
public AudioFeatures.Builder setUri(String uri)
Set the Spotify URI of the audio feature objects track to be built.- Parameters:
uri- The Spotify track URI.- Returns:
- An
AudioFeatures.Builder.
-
setValence
public AudioFeatures.Builder setValence(Float valence)
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
public AudioFeatures 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.
-
-