Interface Address
- All Known Implementing Classes:
AddressImpl
public interface Address
An international Address, consisting of a
Country
and a collection of
components (see AddressComponent
).
The components available to and required by each Country vary.
See CountryCodes
for a complete description.-
Method Summary
Modifier and Type Method Description java.lang.String
get(AddressComponentType compType)
Returns an address component for the given typejava.util.List<AddressComponent>
getComponents()
Return all components of this address (except for Country).Country
getCountry()
Country of the Address.void
set(AddressComponentType compType, java.lang.String val)
Sets an address component to the given valuevoid
setCountry(Country country)
Country of the Address.
-
Method Details
-
getCountry
Country getCountry()Country of the Address. This drives the availableAddressComponentType
s. -
setCountry
Country of the Address. This drives the availableAddressComponentType
s. -
getComponents
java.util.List<AddressComponent> getComponents()Return all components of this address (except for Country). Can be modified. -
set
Sets an address component to the given value- Parameters:
compType
- component typeval
- new value
-
get
Returns an address component for the given type- Parameters:
compType
- component type- Returns:
- component value, or null if no such value
-