Package org.localify.dto
Record Class PopularArtist
java.lang.Object
java.lang.Record
org.localify.dto.PopularArtist
- Record Components:
name- The name of the artist.id- The ID of the artist.cities- A list of cities associated with the artist.spotifyImageLarge- The URL of the artist's large Spotify image.
public record PopularArtist(String name, UUID id, List<ArtistCityResponse> cities, String spotifyImageLarge)
extends Record
Represents a popular artist.
-
Constructor Summary
ConstructorsConstructorDescriptionPopularArtist(String name, UUID id, List<ArtistCityResponse> cities, String spotifyImageLarge) Creates an instance of aPopularArtistrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncities()Returns the value of thecitiesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.name()Returns the value of thenamerecord component.Returns the value of thespotifyImageLargerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PopularArtist
public PopularArtist(String name, UUID id, List<ArtistCityResponse> cities, String spotifyImageLarge) Creates an instance of aPopularArtistrecord class.- Parameters:
name- the value for thenamerecord componentid- the value for theidrecord componentcities- the value for thecitiesrecord componentspotifyImageLarge- the value for thespotifyImageLargerecord 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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
cities
Returns the value of thecitiesrecord component.- Returns:
- the value of the
citiesrecord component
-
spotifyImageLarge
Returns the value of thespotifyImageLargerecord component.- Returns:
- the value of the
spotifyImageLargerecord component
-