Package org.localify.dto.geocoding
Record Class PlaceResults.StructuredAddress
java.lang.Object
java.lang.Record
org.localify.dto.geocoding.PlaceResults.StructuredAddress
- Record Components:
administrativeArea- The administrative area (e.g., state).administrativeAreaCode- The administrative area code (e.g., state code).locality- The locality (e.g., city).subLocality- The sub-locality.
- Enclosing class:
- PlaceResults
public static record PlaceResults.StructuredAddress(String administrativeArea, String administrativeAreaCode, String locality, String subLocality)
extends Record
Represents a structured address.
-
Constructor Summary
ConstructorsConstructorDescriptionStructuredAddress(String administrativeArea, String administrativeAreaCode, String locality, String subLocality) Creates an instance of aStructuredAddressrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadministrativeArearecord component.Returns the value of theadministrativeAreaCoderecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.locality()Returns the value of thelocalityrecord component.Returns the value of thesubLocalityrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StructuredAddress
public StructuredAddress(String administrativeArea, String administrativeAreaCode, String locality, String subLocality) Creates an instance of aStructuredAddressrecord class.- Parameters:
administrativeArea- the value for theadministrativeArearecord componentadministrativeAreaCode- the value for theadministrativeAreaCoderecord componentlocality- the value for thelocalityrecord componentsubLocality- the value for thesubLocalityrecord 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). -
administrativeArea
Returns the value of theadministrativeArearecord component.- Returns:
- the value of the
administrativeArearecord component
-
administrativeAreaCode
Returns the value of theadministrativeAreaCoderecord component.- Returns:
- the value of the
administrativeAreaCoderecord component
-
locality
Returns the value of thelocalityrecord component.- Returns:
- the value of the
localityrecord component
-
subLocality
Returns the value of thesubLocalityrecord component.- Returns:
- the value of the
subLocalityrecord component
-