Record Class ArtistPair

java.lang.Object
java.lang.Record
org.localify.playlist.ArtistPair
Record Components:
local - The local artist.
seed - The seed artist.
localSong - The first song by the local artist.
localSong2 - The second song by the local artist.
localSong3 - The third song by the local artist.
seedSong - The song by the seed artist.

public record ArtistPair(Artist local, Artist seed, Song localSong, Song localSong2, Song localSong3, Song seedSong) extends Record
Represents a pair of artists, one local and one seed, along with their songs.
  • Constructor Details

    • ArtistPair

      public ArtistPair(Artist local, Artist seed, Song localSong, Song localSong2, Song localSong3, Song seedSong)
      Creates an instance of a ArtistPair record class.
      Parameters:
      local - the value for the local record component
      seed - the value for the seed record component
      localSong - the value for the localSong record component
      localSong2 - the value for the localSong2 record component
      localSong3 - the value for the localSong3 record component
      seedSong - the value for the seedSong record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • local

      public Artist local()
      Returns the value of the local record component.
      Returns:
      the value of the local record component
    • seed

      public Artist seed()
      Returns the value of the seed record component.
      Returns:
      the value of the seed record component
    • localSong

      public Song localSong()
      Returns the value of the localSong record component.
      Returns:
      the value of the localSong record component
    • localSong2

      public Song localSong2()
      Returns the value of the localSong2 record component.
      Returns:
      the value of the localSong2 record component
    • localSong3

      public Song localSong3()
      Returns the value of the localSong3 record component.
      Returns:
      the value of the localSong3 record component
    • seedSong

      public Song seedSong()
      Returns the value of the seedSong record component.
      Returns:
      the value of the seedSong record component