Package com.storedobject.common
Class AEAddress
java.lang.Object
com.storedobject.common.Address
com.storedobject.common.AEAddress
AE Address
line[0]: Code for the emirate (0: Abu Dhabi, 1: Dubai, 2: Sharjah, 3: Ajman, 4: Um Al Quwain, 5: Ras Al Khaimah, 6: Fujairah)
line[0]: Code for the emirate (0: Abu Dhabi, 1: Dubai, 2: Sharjah, 3: Ajman, 4: Um Al Quwain, 5: Ras Al Khaimah, 6: Fujairah)
- Author:
- Syam
-
Method Summary
Modifier and TypeMethodDescriptionintRetrieves the emirate code from the last line of the address.Retrieves the name of the emirate based on the last line of the address.static String[]Retrieves the list of emirates in the United Arab Emirates.intGet the number of extra lines.voidsetEmirate(int emirate) Sets the emirate code for the address.Methods inherited from class com.storedobject.common.Address
arrangeLines, check, check, copy, create, create, encode, getApartmentName, getAreaCaption, getAreaName, getBuildingName, getCountry, getHouseName, getLine, getOfficeName, getPOBox, getPOBoxName, getPostalCode, getPostalCodeCaption, getPostalCodeMaxLength, getPostalCodeMinLength, getStreetName, getType, getTypeValue, getTypeValue, getTypeValues, getVillaName, isNumericPostalCode, isPOBoxAddress, isPostalCodeAddress, isPostalCodeMandatory, isValid, poBoxPrefix, poBoxSuffix, setApartmentName, setAreaName, setBuildingName, setHouseName, setLine, setOfficeName, setPOBox, setPostalCode, setStreetName, setType, setVillaName, toString, toString, validate
-
Method Details
-
getExtraLines
public int getExtraLines()Description copied from class:AddressGet the number of extra lines.- Overrides:
getExtraLinesin classAddress- Returns:
- Number of extra lines in the address.
-
setEmirate
public void setEmirate(int emirate) Sets the emirate code for the address.- Parameters:
emirate- an integer representing the code of the emirate (0 for Abu Dhabi, 1 for Dubai, 2 for Sharjah, 3 for Ajman, 4 for Um Al Quwain, 5 for Ras Al Khaimah, 6 for Fujairah). If the input exceeds the valid range, the code will be calculated using modulus division by the total number of emirates.
-
getEmirate
Retrieves the emirate code from the last line of the address.- Returns:
- an integer representing the code of the emirate (0 for Abu Dhabi, 1 for Dubai, 2 for Sharjah, 3 for Ajman, 4 for Um Al Quwain, 5 for Ras Al Khaimah, 6 for Fujairah).
- Throws:
SOException- if an error occurs during number extraction.
-
getEmirateName
Retrieves the name of the emirate based on the last line of the address.- Returns:
- a string representing the name of the emirate.
-
getEmirates
Retrieves the list of emirates in the United Arab Emirates.- Returns:
- an array of strings, each representing the name of an emirate.
-