Package org.localify.artist.dto
Record Class ArtistCityResponse
java.lang.Object
java.lang.Record
org.localify.artist.dto.ArtistCityResponse
- Record Components:
id- The ID of the city.name- The name of the city.zoneCode- The zone code of the city (e.g., state or province).countryCode- The country code of the city.latitude- The latitude of the city.longitude- The longitude of the city.relation- The explanation of the relationship between the artist and the city.
- All Implemented Interfaces:
Serializable
public record ArtistCityResponse(UUID id, String name, String zoneCode, String countryCode, Double latitude, Double longitude, ArtistCityExplanation relation)
extends Record
implements Serializable
Represents the response for a city related to an artist (where the artist is from).
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionArtistCityResponse(UUID id, String name, String zoneCode, String countryCode, Double latitude, Double longitude, ArtistCityExplanation relation) Creates an instance of aArtistCityResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecountryCoderecord 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.latitude()Returns the value of thelatituderecord component.Returns the value of thelongituderecord component.name()Returns the value of thenamerecord component.relation()Returns the value of therelationrecord component.final StringtoString()Returns a string representation of this record class.zoneCode()Returns the value of thezoneCoderecord component.
-
Constructor Details
-
ArtistCityResponse
public ArtistCityResponse(UUID id, String name, String zoneCode, String countryCode, Double latitude, Double longitude, ArtistCityExplanation relation) Creates an instance of aArtistCityResponserecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentzoneCode- the value for thezoneCoderecord componentcountryCode- the value for thecountryCoderecord componentlatitude- the value for thelatituderecord componentlongitude- the value for thelongituderecord componentrelation- the value for therelationrecord 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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
zoneCode
Returns the value of thezoneCoderecord component.- Returns:
- the value of the
zoneCoderecord component
-
countryCode
Returns the value of thecountryCoderecord component.- Returns:
- the value of the
countryCoderecord component
-
latitude
Returns the value of thelatituderecord component.- Returns:
- the value of the
latituderecord component
-
longitude
Returns the value of thelongituderecord component.- Returns:
- the value of the
longituderecord component
-
relation
Returns the value of therelationrecord component.- Returns:
- the value of the
relationrecord component
-