oracle.panama.spatial.intladdress
Interface IntlAddressFormat
- public interface IntlAddressFormat
This interface represents a format of an address in a given country.
In each country, addresses might have a different set of components.
US addresses have states, while Chinese addresses have provinces.
Furthermore, in each country addresses have a different syntax. The first
line in a US address has the format "HouseNumber StreetName". In a German
address, however, the format is "StreetName HouseNumber".
Type | Method |
java.util.Iterator |
getAddressLines()
This function will return a String representation of the address format. |
java.util.Iterator |
getComponentNames()
This function will return an Iterator of component names contained in the
address format (for example {"house", "street", "city", "state",
"postal code", "country"}). |
java.lang.String |
getFormatName()
|
java.lang.String |
lookupAlias(java.lang.String alias)
|
boolean |
usesComponentName(java.lang.String componentName)
This function will return whether a given component name is contained in
the address format (for example "state" is contained in the US address
format). |
getFormatName
public java.lang.String getFormatName()
getComponentNames
public java.util.Iterator getComponentNames()
- This function will return an Iterator of component names contained in the
address format (for example {"house", "street", "city", "state",
"postal code", "country"}).
- Returns:
- an Iterator returning Strings representing the component names
(not their values)
usesComponentName
public boolean usesComponentName(java.lang.String componentName)
- This function will return whether a given component name is contained in
the address format (for example "state" is contained in the US address
format).
- Returns:
- an boolean specifying whether the component name is contained in
the address format
getAddressLines
public java.util.Iterator getAddressLines()
- This function will return a String representation of the address format.
Separate address lines are given in separate Strings. Each component is
represented by a place holder, such as "[state]".
The address pattern for the US could look like
{
"[name]",
"[house] [street] Apt [apt]",
"[city] [state] [postal code]",
"[country]"
}
- Returns:
- an array of Strings representing the
address format
lookupAlias
public java.lang.String lookupAlias(java.lang.String alias)