Package africa.absa.inception.core.util
Class MobilePhoneNumberUtil
- java.lang.Object
-
- africa.absa.inception.core.util.MobilePhoneNumberUtil
-
public final class MobilePhoneNumberUtil extends Object
The MobilePhoneNumberUtil class is a utility class which provides methods for working with mobile phone numbers and MSISDNs.- Author:
- Marcus Portmann
-
-
Field Summary
Fields Modifier and Type Field Description static StringMSISDN_VALIDATION_REGEXThe regular expression used to validate an MobilePhoneNumberUtil.
-
Constructor Summary
Constructors Constructor Description MobilePhoneNumberUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisValidMSISDN(String msisdn)Check whether the specified MobilePhoneNumberUtil is valid.static StringmobilePhoneNumberToMSISDN(String mobilePhoneNumber, String defaultInternationalPrefix)Returns the MobilePhoneNumberUtil for the specified mobile phone number.
-
-
-
Field Detail
-
MSISDN_VALIDATION_REGEX
public static final String MSISDN_VALIDATION_REGEX
The regular expression used to validate an MobilePhoneNumberUtil.- See Also:
- Constant Field Values
-
-
Method Detail
-
isValidMSISDN
public static boolean isValidMSISDN(String msisdn)
Check whether the specified MobilePhoneNumberUtil is valid.- Parameters:
msisdn- the MobilePhoneNumberUtil- Returns:
- true if the MobilePhoneNumberUtil is valid or false otherwise
-
mobilePhoneNumberToMSISDN
public static String mobilePhoneNumberToMSISDN(String mobilePhoneNumber, String defaultInternationalPrefix)
Returns the MobilePhoneNumberUtil for the specified mobile phone number.- Parameters:
mobilePhoneNumber- the mobile phone numberdefaultInternationalPrefix- the default international prefix- Returns:
- the MobilePhoneNumberUtil for the mobile phone number
-
-