Package org.localify.dto
Class SpotifyAudioFeatures
java.lang.Object
org.localify.dto.SpotifyAudioFeatures
- All Implemented Interfaces:
Serializable
Represents the audio features of a track from Spotify.
This class can be embedded in other entities.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SpotifyAudioFeaturesfromSpotify(se.michaelthelin.spotify.model_objects.specification.AudioFeatures source) Creates a SpotifyAudioFeatures object from a Spotify AudioFeatures object.Gets the acousticness.Gets the danceability.Gets the duration in milliseconds.Gets the energy.Gets the instrumentalness.getKey()Gets the key.Gets the liveness.Gets the loudness.se.michaelthelin.spotify.enums.ModalitygetMode()Gets the mode.Gets the speechiness.getTempo()Gets the tempo.Gets the time signature.Gets the valence.voidsetAcousticness(Float acousticness) Sets the acousticness.voidsetDanceability(Float danceability) Sets the danceability.voidsetDurationMs(Integer durationMs) Sets the duration in milliseconds.voidSets the energy.voidsetInstrumentalness(Float instrumentalness) Sets the instrumentalness.voidSets the key.voidsetLiveness(Float liveness) Sets the liveness.voidsetLoudness(Float loudness) Sets the loudness.voidsetMode(se.michaelthelin.spotify.enums.Modality mode) Sets the mode.voidsetSpeechiness(Float speechiness) Sets the speechiness.voidSets the tempo.voidsetTimeSignature(Integer timeSignature) Sets the time signature.voidsetValence(Float valence) Sets the valence.
-
Constructor Details
-
SpotifyAudioFeatures
public SpotifyAudioFeatures()Default constructor.
-
-
Method Details
-
getAcousticness
Gets the acousticness.- Returns:
- The acousticness.
-
setAcousticness
Sets the acousticness.- Parameters:
acousticness- The acousticness.
-
getDanceability
Gets the danceability.- Returns:
- The danceability.
-
setDanceability
Sets the danceability.- Parameters:
danceability- The danceability.
-
getDurationMs
Gets the duration in milliseconds.- Returns:
- The duration in milliseconds.
-
setDurationMs
Sets the duration in milliseconds.- Parameters:
durationMs- The duration in milliseconds.
-
getEnergy
Gets the energy.- Returns:
- The energy.
-
setEnergy
Sets the energy.- Parameters:
energy- The energy.
-
getInstrumentalness
Gets the instrumentalness.- Returns:
- The instrumentalness.
-
setInstrumentalness
Sets the instrumentalness.- Parameters:
instrumentalness- The instrumentalness.
-
getKey
Gets the key.- Returns:
- The key.
-
setKey
Sets the key.- Parameters:
key- The key.
-
getLiveness
Gets the liveness.- Returns:
- The liveness.
-
setLiveness
Sets the liveness.- Parameters:
liveness- The liveness.
-
getLoudness
Gets the loudness.- Returns:
- The loudness.
-
setLoudness
Sets the loudness.- Parameters:
loudness- The loudness.
-
getMode
public se.michaelthelin.spotify.enums.Modality getMode()Gets the mode.- Returns:
- The mode.
-
setMode
public void setMode(se.michaelthelin.spotify.enums.Modality mode) Sets the mode.- Parameters:
mode- The mode.
-
getSpeechiness
Gets the speechiness.- Returns:
- The speechiness.
-
setSpeechiness
Sets the speechiness.- Parameters:
speechiness- The speechiness.
-
getTempo
Gets the tempo.- Returns:
- The tempo.
-
setTempo
Sets the tempo.- Parameters:
tempo- The tempo.
-
getTimeSignature
Gets the time signature.- Returns:
- The time signature.
-
setTimeSignature
Sets the time signature.- Parameters:
timeSignature- The time signature.
-
getValence
Gets the valence.- Returns:
- The valence.
-
setValence
Sets the valence.- Parameters:
valence- The valence.
-
fromSpotify
public static SpotifyAudioFeatures fromSpotify(se.michaelthelin.spotify.model_objects.specification.AudioFeatures source) Creates a SpotifyAudioFeatures object from a Spotify AudioFeatures object.- Parameters:
source- The Spotify AudioFeatures object.- Returns:
- A new SpotifyAudioFeatures object.
-