Package org.localify.dto.geocoding
Record Class PlaceResults.Place
java.lang.Object
java.lang.Record
org.localify.dto.geocoding.PlaceResults.Place
- Record Components:
coordinate- The coordinate of the place.displayMapRegion- The display map region for the place.name- The name of the place.formattedAddressLines- The formatted address lines for the place.structuredAddress- The structured address for the place.country- The country of the place.countryCode- The country code of the place.
- Enclosing class:
- PlaceResults
public static record PlaceResults.Place(PlaceResults.Coordinate coordinate, PlaceResults.DisplayMapRegion displayMapRegion, String name, List<String> formattedAddressLines, PlaceResults.StructuredAddress structuredAddress, String country, String countryCode)
extends Record
Represents a place result from the geocoding API.
-
Constructor Summary
ConstructorsConstructorDescriptionPlace(PlaceResults.Coordinate coordinate, PlaceResults.DisplayMapRegion displayMapRegion, String name, List<String> formattedAddressLines, PlaceResults.StructuredAddress structuredAddress, String country, String countryCode) Creates an instance of aPlacerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecoordinaterecord component.country()Returns the value of thecountryrecord component.Returns the value of thecountryCoderecord component.Returns the value of thedisplayMapRegionrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theformattedAddressLinesrecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of thestructuredAddressrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Place
public Place(PlaceResults.Coordinate coordinate, PlaceResults.DisplayMapRegion displayMapRegion, String name, List<String> formattedAddressLines, PlaceResults.StructuredAddress structuredAddress, String country, String countryCode) Creates an instance of aPlacerecord class.- Parameters:
coordinate- the value for thecoordinaterecord componentdisplayMapRegion- the value for thedisplayMapRegionrecord componentname- the value for thenamerecord componentformattedAddressLines- the value for theformattedAddressLinesrecord componentstructuredAddress- the value for thestructuredAddressrecord componentcountry- the value for thecountryrecord componentcountryCode- the value for thecountryCoderecord 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). -
coordinate
Returns the value of thecoordinaterecord component.- Returns:
- the value of the
coordinaterecord component
-
displayMapRegion
Returns the value of thedisplayMapRegionrecord component.- Returns:
- the value of the
displayMapRegionrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
formattedAddressLines
Returns the value of theformattedAddressLinesrecord component.- Returns:
- the value of the
formattedAddressLinesrecord component
-
structuredAddress
Returns the value of thestructuredAddressrecord component.- Returns:
- the value of the
structuredAddressrecord component
-
country
Returns the value of thecountryrecord component.- Returns:
- the value of the
countryrecord component
-
countryCode
Returns the value of thecountryCoderecord component.- Returns:
- the value of the
countryCoderecord component
-