Package com.storedobject.common
Class PhoneNumber
java.lang.Object
com.storedobject.common.PhoneNumber
Class used to check phone number validity.
A valid phone number starts with a "+" symbol followed by dialing digits with optional space separators. The first one or more digits following the "+" symbol should match with ISD code of one of the countries (see
A valid phone number starts with a "+" symbol followed by dialing digits with optional space separators. The first one or more digits following the "+" symbol should match with ISD code of one of the countries (see
Country.getISDCode()).- Author:
- Syam
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringCheck correctness of the format of the given phone number.static StringCheck correctness of the format of the given phone number.static CountrygetCountry(String phoneNumber) Get the country for the given phone number.
- 
Constructor Details- 
PhoneNumberpublic PhoneNumber()
 
- 
- 
Method Details- 
checkCheck correctness of the format of the given phone number.- Parameters:
- phoneNumber- Phone number
- Returns:
- Phone number (may be modified).
- Throws:
- SOException- If the phone number format is not valid
 
- 
checkCheck correctness of the format of the given phone number.- Parameters:
- phoneNumber- Phone number
- allowEmpty- Whether empty should be taken as valid or not
- Returns:
- Phone number (maybe modified).
- Throws:
- SOException- If the phone number format is not valid
 
- 
getCountry
 
-