Package org.localify.playlist
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.local()Returns the value of thelocalrecord component.Returns the value of thelocalSongrecord component.Returns the value of thelocalSong2record component.Returns the value of thelocalSong3record component.seed()Returns the value of theseedrecord component.seedSong()Returns the value of theseedSongrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ArtistPair
public ArtistPair(Artist local, Artist seed, Song localSong, Song localSong2, Song localSong3, Song seedSong) Creates an instance of aArtistPairrecord class.- Parameters:
local- the value for thelocalrecord componentseed- the value for theseedrecord componentlocalSong- the value for thelocalSongrecord componentlocalSong2- the value for thelocalSong2record componentlocalSong3- the value for thelocalSong3record componentseedSong- the value for theseedSongrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
local
Returns the value of thelocalrecord component.- Returns:
- the value of the
localrecord component
-
seed
Returns the value of theseedrecord component.- Returns:
- the value of the
seedrecord component
-
localSong
Returns the value of thelocalSongrecord component.- Returns:
- the value of the
localSongrecord component
-
localSong2
Returns the value of thelocalSong2record component.- Returns:
- the value of the
localSong2record component
-
localSong3
Returns the value of thelocalSong3record component.- Returns:
- the value of the
localSong3record component
-
seedSong
Returns the value of theseedSongrecord component.- Returns:
- the value of the
seedSongrecord component
-