Package org.localify.dto
Record Class UserNearestCities
java.lang.Object
java.lang.Record
org.localify.dto.UserNearestCities
- Record Components:
cities- A list of cities.fallbackResponse- Whether this is a fallback response.
Represents a list of nearest cities for a user.
-
Constructor Summary
ConstructorsConstructorDescriptionUserNearestCities(List<CityResponse> cities, boolean fallbackResponse) Creates an instance of aUserNearestCitiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncities()Returns the value of thecitiesrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefallbackResponserecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UserNearestCities
Creates an instance of aUserNearestCitiesrecord class.- Parameters:
cities- the value for thecitiesrecord componentfallbackResponse- the value for thefallbackResponserecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
cities
Returns the value of thecitiesrecord component.- Returns:
- the value of the
citiesrecord component
-
fallbackResponse
public boolean fallbackResponse()Returns the value of thefallbackResponserecord component.- Returns:
- the value of the
fallbackResponserecord component
-