java.lang.Object
java.lang.Record
dev.qilletni.api.music.MusicFetcher.TrackNameArtist
- Record Components:
name- A nameartist- An artist's name
- Enclosing interface:
MusicFetcher
An object to hold a name and artist combination.
-
Constructor Summary
ConstructorsConstructorDescriptionTrackNameArtist(String name, String artist) Creates an instance of aTrackNameArtistrecord class. -
Method Summary
Modifier and TypeMethodDescriptionartist()Returns the value of theartistrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanmatchesTrack(Track track) Checks if the given track matches this track name and artist combination.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TrackNameArtist
-
-
Method Details
-
matchesTrack
Checks if the given track matches this track name and artist combination.- Parameters:
track- The track to check- Returns:
- If the track has the current name and artist combination
-
toString
-
hashCode
-
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). -
name
-
artist
-