public class GeoLocation extends Object implements Serializable, Cloneable
A complex type that contains information about a geo location.
Constructor and Description |
---|
GeoLocation() |
Modifier and Type | Method and Description |
---|---|
GeoLocation |
clone() |
boolean |
equals(Object obj) |
String |
getContinentCode()
The code for a continent geo location.
|
String |
getCountryCode()
The code for a country geo location.
|
String |
getSubdivisionCode()
The code for a country's subdivision (e.g., a province of Canada).
|
int |
hashCode() |
void |
setContinentCode(String continentCode)
The code for a continent geo location.
|
void |
setCountryCode(String countryCode)
The code for a country geo location.
|
void |
setSubdivisionCode(String subdivisionCode)
The code for a country's subdivision (e.g., a province of Canada).
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
GeoLocation |
withContinentCode(String continentCode)
The code for a continent geo location.
|
GeoLocation |
withCountryCode(String countryCode)
The code for a country geo location.
|
GeoLocation |
withSubdivisionCode(String subdivisionCode)
The code for a country's subdivision (e.g., a province of Canada).
|
public void setContinentCode(String continentCode)
The code for a continent geo location. Note: only continent locations have a continent code.
Valid values: AF
| AN
| AS
|
EU
| OC
| NA
| SA
Constraint: Specifying ContinentCode
with either
CountryCode
or SubdivisionCode
returns an
InvalidInput error.
continentCode
- The code for a continent geo location. Note: only continent
locations have a continent code.
Valid values: AF
| AN
| AS
| EU
| OC
| NA
|
SA
Constraint: Specifying ContinentCode
with either
CountryCode
or SubdivisionCode
returns
an InvalidInput error.
public String getContinentCode()
The code for a continent geo location. Note: only continent locations have a continent code.
Valid values: AF
| AN
| AS
|
EU
| OC
| NA
| SA
Constraint: Specifying ContinentCode
with either
CountryCode
or SubdivisionCode
returns an
InvalidInput error.
Valid values: AF
| AN
| AS
| EU
| OC
| NA
|
SA
Constraint: Specifying ContinentCode
with either
CountryCode
or SubdivisionCode
returns
an InvalidInput error.
public GeoLocation withContinentCode(String continentCode)
The code for a continent geo location. Note: only continent locations have a continent code.
Valid values: AF
| AN
| AS
|
EU
| OC
| NA
| SA
Constraint: Specifying ContinentCode
with either
CountryCode
or SubdivisionCode
returns an
InvalidInput error.
continentCode
- The code for a continent geo location. Note: only continent
locations have a continent code.
Valid values: AF
| AN
| AS
| EU
| OC
| NA
|
SA
Constraint: Specifying ContinentCode
with either
CountryCode
or SubdivisionCode
returns
an InvalidInput error.
public void setCountryCode(String countryCode)
The code for a country geo location. The default location uses '*' for the country code and will match all locations that are not matched by a geo location.
The default geo location uses a *
for the country code. All
other country codes follow the ISO 3166 two-character code.
countryCode
- The code for a country geo location. The default location uses '*'
for the country code and will match all locations that are not
matched by a geo location.
The default geo location uses a *
for the country
code. All other country codes follow the ISO 3166 two-character
code.
public String getCountryCode()
The code for a country geo location. The default location uses '*' for the country code and will match all locations that are not matched by a geo location.
The default geo location uses a *
for the country code. All
other country codes follow the ISO 3166 two-character code.
The default geo location uses a *
for the country
code. All other country codes follow the ISO 3166 two-character
code.
public GeoLocation withCountryCode(String countryCode)
The code for a country geo location. The default location uses '*' for the country code and will match all locations that are not matched by a geo location.
The default geo location uses a *
for the country code. All
other country codes follow the ISO 3166 two-character code.
countryCode
- The code for a country geo location. The default location uses '*'
for the country code and will match all locations that are not
matched by a geo location.
The default geo location uses a *
for the country
code. All other country codes follow the ISO 3166 two-character
code.
public void setSubdivisionCode(String subdivisionCode)
The code for a country's subdivision (e.g., a province of Canada). A subdivision code is only valid with the appropriate country code.
Constraint: Specifying SubdivisionCode
without
CountryCode
returns an InvalidInput error.
subdivisionCode
- The code for a country's subdivision (e.g., a province of Canada).
A subdivision code is only valid with the appropriate country
code.
Constraint: Specifying SubdivisionCode
without
CountryCode
returns an InvalidInput error.
public String getSubdivisionCode()
The code for a country's subdivision (e.g., a province of Canada). A subdivision code is only valid with the appropriate country code.
Constraint: Specifying SubdivisionCode
without
CountryCode
returns an InvalidInput error.
Constraint: Specifying SubdivisionCode
without
CountryCode
returns an InvalidInput error.
public GeoLocation withSubdivisionCode(String subdivisionCode)
The code for a country's subdivision (e.g., a province of Canada). A subdivision code is only valid with the appropriate country code.
Constraint: Specifying SubdivisionCode
without
CountryCode
returns an InvalidInput error.
subdivisionCode
- The code for a country's subdivision (e.g., a province of Canada).
A subdivision code is only valid with the appropriate country
code.
Constraint: Specifying SubdivisionCode
without
CountryCode
returns an InvalidInput error.
public String toString()
toString
in class Object
Object.toString()
public GeoLocation clone()
Copyright © 2018. All rights reserved.