Class SpotifyAudioFeatures

java.lang.Object
org.localify.dto.SpotifyAudioFeatures
All Implemented Interfaces:
Serializable

@Embeddable public class SpotifyAudioFeatures extends Object implements Serializable
Represents the audio features of a track from Spotify. This class can be embedded in other entities.
See Also:
  • Constructor Details

    • SpotifyAudioFeatures

      public SpotifyAudioFeatures()
      Default constructor.
  • Method Details

    • getAcousticness

      public Float getAcousticness()
      Gets the acousticness.
      Returns:
      The acousticness.
    • setAcousticness

      public void setAcousticness(Float acousticness)
      Sets the acousticness.
      Parameters:
      acousticness - The acousticness.
    • getDanceability

      public Float getDanceability()
      Gets the danceability.
      Returns:
      The danceability.
    • setDanceability

      public void setDanceability(Float danceability)
      Sets the danceability.
      Parameters:
      danceability - The danceability.
    • getDurationMs

      public Integer getDurationMs()
      Gets the duration in milliseconds.
      Returns:
      The duration in milliseconds.
    • setDurationMs

      public void setDurationMs(Integer durationMs)
      Sets the duration in milliseconds.
      Parameters:
      durationMs - The duration in milliseconds.
    • getEnergy

      public Float getEnergy()
      Gets the energy.
      Returns:
      The energy.
    • setEnergy

      public void setEnergy(Float energy)
      Sets the energy.
      Parameters:
      energy - The energy.
    • getInstrumentalness

      public Float getInstrumentalness()
      Gets the instrumentalness.
      Returns:
      The instrumentalness.
    • setInstrumentalness

      public void setInstrumentalness(Float instrumentalness)
      Sets the instrumentalness.
      Parameters:
      instrumentalness - The instrumentalness.
    • getKey

      public Integer getKey()
      Gets the key.
      Returns:
      The key.
    • setKey

      public void setKey(Integer key)
      Sets the key.
      Parameters:
      key - The key.
    • getLiveness

      public Float getLiveness()
      Gets the liveness.
      Returns:
      The liveness.
    • setLiveness

      public void setLiveness(Float liveness)
      Sets the liveness.
      Parameters:
      liveness - The liveness.
    • getLoudness

      public Float getLoudness()
      Gets the loudness.
      Returns:
      The loudness.
    • setLoudness

      public void setLoudness(Float loudness)
      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

      public Float getSpeechiness()
      Gets the speechiness.
      Returns:
      The speechiness.
    • setSpeechiness

      public void setSpeechiness(Float speechiness)
      Sets the speechiness.
      Parameters:
      speechiness - The speechiness.
    • getTempo

      public Float getTempo()
      Gets the tempo.
      Returns:
      The tempo.
    • setTempo

      public void setTempo(Float tempo)
      Sets the tempo.
      Parameters:
      tempo - The tempo.
    • getTimeSignature

      public Integer getTimeSignature()
      Gets the time signature.
      Returns:
      The time signature.
    • setTimeSignature

      public void setTimeSignature(Integer timeSignature)
      Sets the time signature.
      Parameters:
      timeSignature - The time signature.
    • getValence

      public Float getValence()
      Gets the valence.
      Returns:
      The valence.
    • setValence

      public void setValence(Float valence)
      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.