Package org.localify.city.dto
Record Class CityArtistProportionResponse
java.lang.Object
java.lang.Record
org.localify.city.dto.CityArtistProportionResponse
- Record Components:
id- The ID of the city.name- The name of the city.zoneCode- The zone code of the city.countryCode- The country code of the city.population- The population of the city.numArtists- The number of artists in the city.popPerArtist- The population per artist.
public record CityArtistProportionResponse(UUID id, String name, String zoneCode, String countryCode, Long population, Integer numArtists, Double popPerArtist)
extends Record
Represents the proportion of artists to population in a city.
-
Constructor Summary
Constructors -
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.name()Returns the value of thenamerecord component.Returns the value of thenumArtistsrecord component.Returns the value of thepopPerArtistrecord component.Returns the value of thepopulationrecord component.final StringtoString()Returns a string representation of this record class.zoneCode()Returns the value of thezoneCoderecord component.
-
Constructor Details
-
CityArtistProportionResponse
public CityArtistProportionResponse(UUID id, String name, String zoneCode, String countryCode, @Nullable Long population, @Nullable Integer numArtists, @Nullable Double popPerArtist) Creates an instance of aCityArtistProportionResponserecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentzoneCode- the value for thezoneCoderecord componentcountryCode- the value for thecountryCoderecord componentpopulation- the value for thepopulationrecord componentnumArtists- the value for thenumArtistsrecord componentpopPerArtist- the value for thepopPerArtistrecord 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
-
population
Returns the value of thepopulationrecord component.- Returns:
- the value of the
populationrecord component
-
numArtists
Returns the value of thenumArtistsrecord component.- Returns:
- the value of the
numArtistsrecord component
-
popPerArtist
Returns the value of thepopPerArtistrecord component.- Returns:
- the value of the
popPerArtistrecord component
-