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
Modifier and Type Method Description AudioFeaturesbuild()Build a model object with the information set in the builder object.AudioFeatures.BuildersetAcousticness(java.lang.Float acousticness)Set the acousticness of the audio features object to be built.AudioFeatures.BuildersetAnalysisUrl(java.lang.String analysisUrl)Set the Spotify Web API audio analysis endpoint URL of the audio features object to be built.AudioFeatures.BuildersetDanceability(java.lang.Float danceability)Set the danceability of the audio features object to be built.AudioFeatures.BuildersetDurationMs(java.lang.Integer durationMs)Set the duration in milliseconds of the audio features object to be built.AudioFeatures.BuildersetEnergy(java.lang.Float energy)Set the energy of the audio features object to be built.AudioFeatures.BuildersetId(java.lang.String id)Set the Spotify track ID of the audio features object to be built.AudioFeatures.BuildersetInstrumentalness(java.lang.Float instrumentalness)Set the instrumentalness of the audio features object to be built.AudioFeatures.BuildersetKey(java.lang.Integer key)Set the key of the audio features object to be built.AudioFeatures.BuildersetLiveness(java.lang.Float liveness)Set the liveness of the audio features object to be built.AudioFeatures.BuildersetLoudness(java.lang.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(java.lang.Float speechiness)Set the speechiness of the audio features object to be built.AudioFeatures.BuildersetTempo(java.lang.Float tempo)Set the tempo of the audio features object to be built.AudioFeatures.BuildersetTimeSignature(java.lang.Integer timeSignature)Set the time signature of the audio features object to be built.AudioFeatures.BuildersetTrackHref(java.lang.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(java.lang.String uri)Set the Spotify URI of the audio feature objects track to be built.AudioFeatures.BuildersetValence(java.lang.Float valence)Set the valence of the audio features object to be built.
-
-
-
Method Detail
-
setAcousticness
public AudioFeatures.Builder setAcousticness(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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.
-
-