Package org.localify.user.dto
Record Class UserCitiesResponse
java.lang.Object
java.lang.Record
org.localify.user.dto.UserCitiesResponse
- Record Components:
current- The currently selected city.others- The user's other cities.
public record UserCitiesResponse(UserCityContainer current, List<UserCityContainer> others)
extends Record
A response containing the user's cities.
-
Constructor Summary
ConstructorsConstructorDescriptionUserCitiesResponse(UserCityContainer current, List<UserCityContainer> others) Creates an instance of aUserCitiesResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptioncurrent()Returns the value of thecurrentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.others()Returns the value of theothersrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
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). -
current
Returns the value of thecurrentrecord component.- Returns:
- the value of the
currentrecord component
-
others
Returns the value of theothersrecord component.- Returns:
- the value of the
othersrecord component
-