/* * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.geo.model; import java.io.Serializable; /** *

* Contains details about addresses or points of interest that match the search * criteria. *

*

* Not all details are included with all responses. Some details may only be * returned by specific data partners. *

*/ public class Place implements Serializable { /** *

* The numerical portion of an address, such as a building number. *

*/ private String addressNumber; /** *

* The Amazon Location categories that describe this Place. *

*

* For more information about using categories, including a list of Amazon * Location categories, see Categories and filtering, in the Amazon Location Service * Developer Guide. *

*/ private java.util.List categories; /** *

* A country/region specified using ISO 3166 * 3-digit country/region code. For example, CAN. *

*/ private String country; /** *

* Places uses a point geometry to specify a location or a Place. *

*/ private PlaceGeometry geometry; /** *

* True if the result is interpolated from other known places. *

*

* False if the Place is a known place. *

*

* Not returned when the partner does not provide the information. *

*

* For example, returns False for an address location that is * found in the partner data, but returns True if an address * does not exist in the partner data and its location is calculated by * interpolating between other known addresses. *

*/ private Boolean interpolated; /** *

* The full name and address of the point of interest such as a city, * region, or country. For example, * 123 Any Street, Any Town, USA. *

*/ private String label; /** *

* A name for a local area, such as a city or town name. For example, * Toronto. *

*/ private String municipality; /** *

* The name of a community district. For example, Downtown. *

*/ private String neighborhood; /** *

* A group of numbers and letters in a country-specific format, which * accompanies the address for the purpose of identifying a location. *

*/ private String postalCode; /** *

* A name for an area or geographical division, such as a province or state * name. For example, British Columbia. *

*/ private String region; /** *

* The name for a street or a road to identify a location. For example, * Main Street. *

*/ private String street; /** *

* A county, or an area that's part of a larger region. For example, * Metro Vancouver. *

*/ private String subRegion; /** *

* Categories from the data provider that describe the Place that are not * mapped to any Amazon Location categories. *

*/ private java.util.List supplementalCategories; /** *

* The time zone in which the Place is located. Returned only * when using HERE or Grab as the selected partner. *

*/ private TimeZone timeZone; /** *

* For addresses with multiple units, the unit identifier. Can include * numbers and letters, for example 3B or Unit 123 * . *

* *

* Returned only for a place index that uses Esri or Grab as a data * provider. Is not returned for SearchPlaceIndexForPosition. *

*
*/ private String unitNumber; /** *

* For addresses with a UnitNumber, the type of unit. For * example, Apartment. *

* *

* Returned only for a place index that uses Esri as a data provider. *

*
*/ private String unitType; /** *

* The numerical portion of an address, such as a building number. *

* * @return

* The numerical portion of an address, such as a building number. *

*/ public String getAddressNumber() { return addressNumber; } /** *

* The numerical portion of an address, such as a building number. *

* * @param addressNumber

* The numerical portion of an address, such as a building * number. *

*/ public void setAddressNumber(String addressNumber) { this.addressNumber = addressNumber; } /** *

* The numerical portion of an address, such as a building number. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param addressNumber

* The numerical portion of an address, such as a building * number. *

* @return A reference to this updated object so that method calls can be * chained together. */ public Place withAddressNumber(String addressNumber) { this.addressNumber = addressNumber; return this; } /** *

* The Amazon Location categories that describe this Place. *

*

* For more information about using categories, including a list of Amazon * Location categories, see Categories and filtering, in the Amazon Location Service * Developer Guide. *

* * @return

* The Amazon Location categories that describe this Place. *

*

* For more information about using categories, including a list of * Amazon Location categories, see Categories and filtering, in the Amazon Location Service * Developer Guide. *

*/ public java.util.List getCategories() { return categories; } /** *

* The Amazon Location categories that describe this Place. *

*

* For more information about using categories, including a list of Amazon * Location categories, see Categories and filtering, in the Amazon Location Service * Developer Guide. *

* * @param categories

* The Amazon Location categories that describe this Place. *

*

* For more information about using categories, including a list * of Amazon Location categories, see Categories and filtering, in the Amazon Location * Service Developer Guide. *

*/ public void setCategories(java.util.Collection categories) { if (categories == null) { this.categories = null; return; } this.categories = new java.util.ArrayList(categories); } /** *

* The Amazon Location categories that describe this Place. *

*

* For more information about using categories, including a list of Amazon * Location categories, see Categories and filtering, in the Amazon Location Service * Developer Guide. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param categories

* The Amazon Location categories that describe this Place. *

*

* For more information about using categories, including a list * of Amazon Location categories, see Categories and filtering, in the Amazon Location * Service Developer Guide. *

* @return A reference to this updated object so that method calls can be * chained together. */ public Place withCategories(String... categories) { if (getCategories() == null) { this.categories = new java.util.ArrayList(categories.length); } for (String value : categories) { this.categories.add(value); } return this; } /** *

* The Amazon Location categories that describe this Place. *

*

* For more information about using categories, including a list of Amazon * Location categories, see Categories and filtering, in the Amazon Location Service * Developer Guide. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param categories

* The Amazon Location categories that describe this Place. *

*

* For more information about using categories, including a list * of Amazon Location categories, see Categories and filtering, in the Amazon Location * Service Developer Guide. *

* @return A reference to this updated object so that method calls can be * chained together. */ public Place withCategories(java.util.Collection categories) { setCategories(categories); return this; } /** *

* A country/region specified using ISO 3166 * 3-digit country/region code. For example, CAN. *

* * @return

* A country/region specified using ISO * 3166 3-digit country/region code. For example, * CAN. *

*/ public String getCountry() { return country; } /** *

* A country/region specified using ISO 3166 * 3-digit country/region code. For example, CAN. *

* * @param country

* A country/region specified using ISO * 3166 3-digit country/region code. For example, * CAN. *

*/ public void setCountry(String country) { this.country = country; } /** *

* A country/region specified using ISO 3166 * 3-digit country/region code. For example, CAN. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param country

* A country/region specified using ISO * 3166 3-digit country/region code. For example, * CAN. *

* @return A reference to this updated object so that method calls can be * chained together. */ public Place withCountry(String country) { this.country = country; return this; } /** *

* Places uses a point geometry to specify a location or a Place. *

* * @return

* Places uses a point geometry to specify a location or a Place. *

*/ public PlaceGeometry getGeometry() { return geometry; } /** *

* Places uses a point geometry to specify a location or a Place. *

* * @param geometry

* Places uses a point geometry to specify a location or a Place. *

*/ public void setGeometry(PlaceGeometry geometry) { this.geometry = geometry; } /** *

* Places uses a point geometry to specify a location or a Place. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param geometry

* Places uses a point geometry to specify a location or a Place. *

* @return A reference to this updated object so that method calls can be * chained together. */ public Place withGeometry(PlaceGeometry geometry) { this.geometry = geometry; return this; } /** *

* True if the result is interpolated from other known places. *

*

* False if the Place is a known place. *

*

* Not returned when the partner does not provide the information. *

*

* For example, returns False for an address location that is * found in the partner data, but returns True if an address * does not exist in the partner data and its location is calculated by * interpolating between other known addresses. *

* * @return

* True if the result is interpolated from other known * places. *

*

* False if the Place is a known place. *

*

* Not returned when the partner does not provide the information. *

*

* For example, returns False for an address location * that is found in the partner data, but returns True * if an address does not exist in the partner data and its location * is calculated by interpolating between other known addresses. *

*/ public Boolean isInterpolated() { return interpolated; } /** *

* True if the result is interpolated from other known places. *

*

* False if the Place is a known place. *

*

* Not returned when the partner does not provide the information. *

*

* For example, returns False for an address location that is * found in the partner data, but returns True if an address * does not exist in the partner data and its location is calculated by * interpolating between other known addresses. *

* * @return

* True if the result is interpolated from other known * places. *

*

* False if the Place is a known place. *

*

* Not returned when the partner does not provide the information. *

*

* For example, returns False for an address location * that is found in the partner data, but returns True * if an address does not exist in the partner data and its location * is calculated by interpolating between other known addresses. *

*/ public Boolean getInterpolated() { return interpolated; } /** *

* True if the result is interpolated from other known places. *

*

* False if the Place is a known place. *

*

* Not returned when the partner does not provide the information. *

*

* For example, returns False for an address location that is * found in the partner data, but returns True if an address * does not exist in the partner data and its location is calculated by * interpolating between other known addresses. *

* * @param interpolated

* True if the result is interpolated from other * known places. *

*

* False if the Place is a known place. *

*

* Not returned when the partner does not provide the * information. *

*

* For example, returns False for an address * location that is found in the partner data, but returns * True if an address does not exist in the partner * data and its location is calculated by interpolating between * other known addresses. *

*/ public void setInterpolated(Boolean interpolated) { this.interpolated = interpolated; } /** *

* True if the result is interpolated from other known places. *

*

* False if the Place is a known place. *

*

* Not returned when the partner does not provide the information. *

*

* For example, returns False for an address location that is * found in the partner data, but returns True if an address * does not exist in the partner data and its location is calculated by * interpolating between other known addresses. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param interpolated

* True if the result is interpolated from other * known places. *

*

* False if the Place is a known place. *

*

* Not returned when the partner does not provide the * information. *

*

* For example, returns False for an address * location that is found in the partner data, but returns * True if an address does not exist in the partner * data and its location is calculated by interpolating between * other known addresses. *

* @return A reference to this updated object so that method calls can be * chained together. */ public Place withInterpolated(Boolean interpolated) { this.interpolated = interpolated; return this; } /** *

* The full name and address of the point of interest such as a city, * region, or country. For example, * 123 Any Street, Any Town, USA. *

* * @return

* The full name and address of the point of interest such as a * city, region, or country. For example, * 123 Any Street, Any Town, USA. *

*/ public String getLabel() { return label; } /** *

* The full name and address of the point of interest such as a city, * region, or country. For example, * 123 Any Street, Any Town, USA. *

* * @param label

* The full name and address of the point of interest such as a * city, region, or country. For example, * 123 Any Street, Any Town, USA. *

*/ public void setLabel(String label) { this.label = label; } /** *

* The full name and address of the point of interest such as a city, * region, or country. For example, * 123 Any Street, Any Town, USA. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param label

* The full name and address of the point of interest such as a * city, region, or country. For example, * 123 Any Street, Any Town, USA. *

* @return A reference to this updated object so that method calls can be * chained together. */ public Place withLabel(String label) { this.label = label; return this; } /** *

* A name for a local area, such as a city or town name. For example, * Toronto. *

* * @return

* A name for a local area, such as a city or town name. For * example, Toronto. *

*/ public String getMunicipality() { return municipality; } /** *

* A name for a local area, such as a city or town name. For example, * Toronto. *

* * @param municipality

* A name for a local area, such as a city or town name. For * example, Toronto. *

*/ public void setMunicipality(String municipality) { this.municipality = municipality; } /** *

* A name for a local area, such as a city or town name. For example, * Toronto. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param municipality

* A name for a local area, such as a city or town name. For * example, Toronto. *

* @return A reference to this updated object so that method calls can be * chained together. */ public Place withMunicipality(String municipality) { this.municipality = municipality; return this; } /** *

* The name of a community district. For example, Downtown. *

* * @return

* The name of a community district. For example, * Downtown. *

*/ public String getNeighborhood() { return neighborhood; } /** *

* The name of a community district. For example, Downtown. *

* * @param neighborhood

* The name of a community district. For example, * Downtown. *

*/ public void setNeighborhood(String neighborhood) { this.neighborhood = neighborhood; } /** *

* The name of a community district. For example, Downtown. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param neighborhood

* The name of a community district. For example, * Downtown. *

* @return A reference to this updated object so that method calls can be * chained together. */ public Place withNeighborhood(String neighborhood) { this.neighborhood = neighborhood; return this; } /** *

* A group of numbers and letters in a country-specific format, which * accompanies the address for the purpose of identifying a location. *

* * @return

* A group of numbers and letters in a country-specific format, * which accompanies the address for the purpose of identifying a * location. *

*/ public String getPostalCode() { return postalCode; } /** *

* A group of numbers and letters in a country-specific format, which * accompanies the address for the purpose of identifying a location. *

* * @param postalCode

* A group of numbers and letters in a country-specific format, * which accompanies the address for the purpose of identifying a * location. *

*/ public void setPostalCode(String postalCode) { this.postalCode = postalCode; } /** *

* A group of numbers and letters in a country-specific format, which * accompanies the address for the purpose of identifying a location. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param postalCode

* A group of numbers and letters in a country-specific format, * which accompanies the address for the purpose of identifying a * location. *

* @return A reference to this updated object so that method calls can be * chained together. */ public Place withPostalCode(String postalCode) { this.postalCode = postalCode; return this; } /** *

* A name for an area or geographical division, such as a province or state * name. For example, British Columbia. *

* * @return

* A name for an area or geographical division, such as a province * or state name. For example, British Columbia. *

*/ public String getRegion() { return region; } /** *

* A name for an area or geographical division, such as a province or state * name. For example, British Columbia. *

* * @param region

* A name for an area or geographical division, such as a * province or state name. For example, * British Columbia. *

*/ public void setRegion(String region) { this.region = region; } /** *

* A name for an area or geographical division, such as a province or state * name. For example, British Columbia. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param region

* A name for an area or geographical division, such as a * province or state name. For example, * British Columbia. *

* @return A reference to this updated object so that method calls can be * chained together. */ public Place withRegion(String region) { this.region = region; return this; } /** *

* The name for a street or a road to identify a location. For example, * Main Street. *

* * @return

* The name for a street or a road to identify a location. For * example, Main Street. *

*/ public String getStreet() { return street; } /** *

* The name for a street or a road to identify a location. For example, * Main Street. *

* * @param street

* The name for a street or a road to identify a location. For * example, Main Street. *

*/ public void setStreet(String street) { this.street = street; } /** *

* The name for a street or a road to identify a location. For example, * Main Street. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param street

* The name for a street or a road to identify a location. For * example, Main Street. *

* @return A reference to this updated object so that method calls can be * chained together. */ public Place withStreet(String street) { this.street = street; return this; } /** *

* A county, or an area that's part of a larger region. For example, * Metro Vancouver. *

* * @return

* A county, or an area that's part of a larger region. For example, * Metro Vancouver. *

*/ public String getSubRegion() { return subRegion; } /** *

* A county, or an area that's part of a larger region. For example, * Metro Vancouver. *

* * @param subRegion

* A county, or an area that's part of a larger region. For * example, Metro Vancouver. *

*/ public void setSubRegion(String subRegion) { this.subRegion = subRegion; } /** *

* A county, or an area that's part of a larger region. For example, * Metro Vancouver. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param subRegion

* A county, or an area that's part of a larger region. For * example, Metro Vancouver. *

* @return A reference to this updated object so that method calls can be * chained together. */ public Place withSubRegion(String subRegion) { this.subRegion = subRegion; return this; } /** *

* Categories from the data provider that describe the Place that are not * mapped to any Amazon Location categories. *

* * @return

* Categories from the data provider that describe the Place that * are not mapped to any Amazon Location categories. *

*/ public java.util.List getSupplementalCategories() { return supplementalCategories; } /** *

* Categories from the data provider that describe the Place that are not * mapped to any Amazon Location categories. *

* * @param supplementalCategories

* Categories from the data provider that describe the Place that * are not mapped to any Amazon Location categories. *

*/ public void setSupplementalCategories(java.util.Collection supplementalCategories) { if (supplementalCategories == null) { this.supplementalCategories = null; return; } this.supplementalCategories = new java.util.ArrayList(supplementalCategories); } /** *

* Categories from the data provider that describe the Place that are not * mapped to any Amazon Location categories. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param supplementalCategories

* Categories from the data provider that describe the Place that * are not mapped to any Amazon Location categories. *

* @return A reference to this updated object so that method calls can be * chained together. */ public Place withSupplementalCategories(String... supplementalCategories) { if (getSupplementalCategories() == null) { this.supplementalCategories = new java.util.ArrayList( supplementalCategories.length); } for (String value : supplementalCategories) { this.supplementalCategories.add(value); } return this; } /** *

* Categories from the data provider that describe the Place that are not * mapped to any Amazon Location categories. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param supplementalCategories

* Categories from the data provider that describe the Place that * are not mapped to any Amazon Location categories. *

* @return A reference to this updated object so that method calls can be * chained together. */ public Place withSupplementalCategories(java.util.Collection supplementalCategories) { setSupplementalCategories(supplementalCategories); return this; } /** *

* The time zone in which the Place is located. Returned only * when using HERE or Grab as the selected partner. *

* * @return

* The time zone in which the Place is located. * Returned only when using HERE or Grab as the selected partner. *

*/ public TimeZone getTimeZone() { return timeZone; } /** *

* The time zone in which the Place is located. Returned only * when using HERE or Grab as the selected partner. *

* * @param timeZone

* The time zone in which the Place is located. * Returned only when using HERE or Grab as the selected partner. *

*/ public void setTimeZone(TimeZone timeZone) { this.timeZone = timeZone; } /** *

* The time zone in which the Place is located. Returned only * when using HERE or Grab as the selected partner. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param timeZone

* The time zone in which the Place is located. * Returned only when using HERE or Grab as the selected partner. *

* @return A reference to this updated object so that method calls can be * chained together. */ public Place withTimeZone(TimeZone timeZone) { this.timeZone = timeZone; return this; } /** *

* For addresses with multiple units, the unit identifier. Can include * numbers and letters, for example 3B or Unit 123 * . *

* *

* Returned only for a place index that uses Esri or Grab as a data * provider. Is not returned for SearchPlaceIndexForPosition. *

*
* * @return

* For addresses with multiple units, the unit identifier. Can * include numbers and letters, for example 3B or * Unit 123. *

* *

* Returned only for a place index that uses Esri or Grab as a data * provider. Is not returned for * SearchPlaceIndexForPosition. *

*
*/ public String getUnitNumber() { return unitNumber; } /** *

* For addresses with multiple units, the unit identifier. Can include * numbers and letters, for example 3B or Unit 123 * . *

* *

* Returned only for a place index that uses Esri or Grab as a data * provider. Is not returned for SearchPlaceIndexForPosition. *

*
* * @param unitNumber

* For addresses with multiple units, the unit identifier. Can * include numbers and letters, for example 3B or * Unit 123. *

* *

* Returned only for a place index that uses Esri or Grab as a * data provider. Is not returned for * SearchPlaceIndexForPosition. *

*
*/ public void setUnitNumber(String unitNumber) { this.unitNumber = unitNumber; } /** *

* For addresses with multiple units, the unit identifier. Can include * numbers and letters, for example 3B or Unit 123 * . *

* *

* Returned only for a place index that uses Esri or Grab as a data * provider. Is not returned for SearchPlaceIndexForPosition. *

*
*

* Returns a reference to this object so that method calls can be chained * together. * * @param unitNumber

* For addresses with multiple units, the unit identifier. Can * include numbers and letters, for example 3B or * Unit 123. *

* *

* Returned only for a place index that uses Esri or Grab as a * data provider. Is not returned for * SearchPlaceIndexForPosition. *

*
* @return A reference to this updated object so that method calls can be * chained together. */ public Place withUnitNumber(String unitNumber) { this.unitNumber = unitNumber; return this; } /** *

* For addresses with a UnitNumber, the type of unit. For * example, Apartment. *

* *

* Returned only for a place index that uses Esri as a data provider. *

*
* * @return

* For addresses with a UnitNumber, the type of unit. * For example, Apartment. *

* *

* Returned only for a place index that uses Esri as a data * provider. *

*
*/ public String getUnitType() { return unitType; } /** *

* For addresses with a UnitNumber, the type of unit. For * example, Apartment. *

* *

* Returned only for a place index that uses Esri as a data provider. *

*
* * @param unitType

* For addresses with a UnitNumber, the type of * unit. For example, Apartment. *

* *

* Returned only for a place index that uses Esri as a data * provider. *

*
*/ public void setUnitType(String unitType) { this.unitType = unitType; } /** *

* For addresses with a UnitNumber, the type of unit. For * example, Apartment. *

* *

* Returned only for a place index that uses Esri as a data provider. *

*
*

* Returns a reference to this object so that method calls can be chained * together. * * @param unitType

* For addresses with a UnitNumber, the type of * unit. For example, Apartment. *

* *

* Returned only for a place index that uses Esri as a data * provider. *

*
* @return A reference to this updated object so that method calls can be * chained together. */ public Place withUnitType(String unitType) { this.unitType = unitType; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAddressNumber() != null) sb.append("AddressNumber: " + getAddressNumber() + ","); if (getCategories() != null) sb.append("Categories: " + getCategories() + ","); if (getCountry() != null) sb.append("Country: " + getCountry() + ","); if (getGeometry() != null) sb.append("Geometry: " + getGeometry() + ","); if (getInterpolated() != null) sb.append("Interpolated: " + getInterpolated() + ","); if (getLabel() != null) sb.append("Label: " + getLabel() + ","); if (getMunicipality() != null) sb.append("Municipality: " + getMunicipality() + ","); if (getNeighborhood() != null) sb.append("Neighborhood: " + getNeighborhood() + ","); if (getPostalCode() != null) sb.append("PostalCode: " + getPostalCode() + ","); if (getRegion() != null) sb.append("Region: " + getRegion() + ","); if (getStreet() != null) sb.append("Street: " + getStreet() + ","); if (getSubRegion() != null) sb.append("SubRegion: " + getSubRegion() + ","); if (getSupplementalCategories() != null) sb.append("SupplementalCategories: " + getSupplementalCategories() + ","); if (getTimeZone() != null) sb.append("TimeZone: " + getTimeZone() + ","); if (getUnitNumber() != null) sb.append("UnitNumber: " + getUnitNumber() + ","); if (getUnitType() != null) sb.append("UnitType: " + getUnitType()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAddressNumber() == null) ? 0 : getAddressNumber().hashCode()); hashCode = prime * hashCode + ((getCategories() == null) ? 0 : getCategories().hashCode()); hashCode = prime * hashCode + ((getCountry() == null) ? 0 : getCountry().hashCode()); hashCode = prime * hashCode + ((getGeometry() == null) ? 0 : getGeometry().hashCode()); hashCode = prime * hashCode + ((getInterpolated() == null) ? 0 : getInterpolated().hashCode()); hashCode = prime * hashCode + ((getLabel() == null) ? 0 : getLabel().hashCode()); hashCode = prime * hashCode + ((getMunicipality() == null) ? 0 : getMunicipality().hashCode()); hashCode = prime * hashCode + ((getNeighborhood() == null) ? 0 : getNeighborhood().hashCode()); hashCode = prime * hashCode + ((getPostalCode() == null) ? 0 : getPostalCode().hashCode()); hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode()); hashCode = prime * hashCode + ((getStreet() == null) ? 0 : getStreet().hashCode()); hashCode = prime * hashCode + ((getSubRegion() == null) ? 0 : getSubRegion().hashCode()); hashCode = prime * hashCode + ((getSupplementalCategories() == null) ? 0 : getSupplementalCategories() .hashCode()); hashCode = prime * hashCode + ((getTimeZone() == null) ? 0 : getTimeZone().hashCode()); hashCode = prime * hashCode + ((getUnitNumber() == null) ? 0 : getUnitNumber().hashCode()); hashCode = prime * hashCode + ((getUnitType() == null) ? 0 : getUnitType().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Place == false) return false; Place other = (Place) obj; if (other.getAddressNumber() == null ^ this.getAddressNumber() == null) return false; if (other.getAddressNumber() != null && other.getAddressNumber().equals(this.getAddressNumber()) == false) return false; if (other.getCategories() == null ^ this.getCategories() == null) return false; if (other.getCategories() != null && other.getCategories().equals(this.getCategories()) == false) return false; if (other.getCountry() == null ^ this.getCountry() == null) return false; if (other.getCountry() != null && other.getCountry().equals(this.getCountry()) == false) return false; if (other.getGeometry() == null ^ this.getGeometry() == null) return false; if (other.getGeometry() != null && other.getGeometry().equals(this.getGeometry()) == false) return false; if (other.getInterpolated() == null ^ this.getInterpolated() == null) return false; if (other.getInterpolated() != null && other.getInterpolated().equals(this.getInterpolated()) == false) return false; if (other.getLabel() == null ^ this.getLabel() == null) return false; if (other.getLabel() != null && other.getLabel().equals(this.getLabel()) == false) return false; if (other.getMunicipality() == null ^ this.getMunicipality() == null) return false; if (other.getMunicipality() != null && other.getMunicipality().equals(this.getMunicipality()) == false) return false; if (other.getNeighborhood() == null ^ this.getNeighborhood() == null) return false; if (other.getNeighborhood() != null && other.getNeighborhood().equals(this.getNeighborhood()) == false) return false; if (other.getPostalCode() == null ^ this.getPostalCode() == null) return false; if (other.getPostalCode() != null && other.getPostalCode().equals(this.getPostalCode()) == false) return false; if (other.getRegion() == null ^ this.getRegion() == null) return false; if (other.getRegion() != null && other.getRegion().equals(this.getRegion()) == false) return false; if (other.getStreet() == null ^ this.getStreet() == null) return false; if (other.getStreet() != null && other.getStreet().equals(this.getStreet()) == false) return false; if (other.getSubRegion() == null ^ this.getSubRegion() == null) return false; if (other.getSubRegion() != null && other.getSubRegion().equals(this.getSubRegion()) == false) return false; if (other.getSupplementalCategories() == null ^ this.getSupplementalCategories() == null) return false; if (other.getSupplementalCategories() != null && other.getSupplementalCategories().equals(this.getSupplementalCategories()) == false) return false; if (other.getTimeZone() == null ^ this.getTimeZone() == null) return false; if (other.getTimeZone() != null && other.getTimeZone().equals(this.getTimeZone()) == false) return false; if (other.getUnitNumber() == null ^ this.getUnitNumber() == null) return false; if (other.getUnitNumber() != null && other.getUnitNumber().equals(this.getUnitNumber()) == false) return false; if (other.getUnitType() == null ^ this.getUnitType() == null) return false; if (other.getUnitType() != null && other.getUnitType().equals(this.getUnitType()) == false) return false; return true; } }