Class Address

java.lang.Object
com.storedobject.common.Address
Direct Known Subclasses:
AEAddress, CHAddress, GBAddress, INAddress, MYAddress, PKAddress, USAddress, XXAddress

public abstract class Address extends Object
Class to check and manipulate mailing address information. Address is a String containing multiple lines of text (delimited by newline character). A valid address is stored in the following format:
First line: CCdX where
CC = the ISO 2 character country code (Example: IN for India, PK for Pakistan, US for USA)
d = Digit 0, 1, 2 or 3 (0 for Apartment, 1 for Villa, 2 for House, 3 for Office)
X = Apartment/villa/office number/name. Can contain any free text but can't be blank
Second line: Building name (may include floor/level etc.). Mandatory for apartments.
Third line: Street name.
Fourth line: Area/Community name.
Depending on the country, rest of the lines are interpreted.
Generic address is formatted as follows:
Line 0: Apartment/Villa/House XXX
Line 1: Building Name
Line 2: Street Name
Line 3: Area/Community Name
Line 4: Country Name
Author:
Syam