Class AbstractPhoneNumberUtil
- java.lang.Object
-
- de.knightsoftnet.validators.shared.util.AbstractPhoneNumberUtil
-
- Direct Known Subclasses:
PhoneNumberUtil
public abstract class AbstractPhoneNumberUtil extends Object
Abstract Phone Number Util, format and parse phone numbers.- Author:
- Manfred Tremmel
-
-
Field Summary
Fields Modifier and Type Field Description protected PhoneCountryDatadefaultCountryDataprotected PhoneCountryConstantsProviderphoneCountryConstantsProvider
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPhoneNumberUtil(PhoneCountryConstantsProvider phoneCountryConstantsProvider)protectedAbstractPhoneNumberUtil(String pcountryCode, PhoneCountryConstantsProvider phoneCountryConstantsProvider)constructor with default country.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringformatCommon(PhoneNumberInterface pphoneNumberData)format phone number in common format.StringformatCommon(PhoneNumberInterface pphoneNumberData, PhoneCountryData pcountryData)format phone number in common format.StringformatCommon(PhoneNumberInterface pphoneNumberData, String pcountryCode)format phone number in common format.ValueWithPos<String>formatCommon(ValueWithPos<String> pphoneNumber)format phone number in common format with cursor position handling.StringformatCommon(String pphoneNumber)format phone number in Common format.StringformatCommon(String pphoneNumber, String pcountryCode)format phone number in common format.StringformatCommonInternational(PhoneNumberInterface pphoneNumberData)format phone number in Common international format.ValueWithPos<String>formatCommonInternational(ValueWithPos<String> pphoneNumber)format phone number in common international format with cursor position handling.StringformatCommonInternational(String pphoneNumber)format phone number in Common international format.StringformatCommonInternational(String pphoneNumber, String pcountryCode)format phone number in common international format.ValueWithPos<String>formatCommonInternationalWithPos(ValueWithPos<PhoneNumberData> pphoneNumberData)format phone number in common international format with cursor position handling.ValueWithPos<String>formatCommonInternationalWithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)format phone number in common international format with cursor position handling.StringformatCommonNational(PhoneNumberInterface pphoneNumberData)format phone number in Common national format.ValueWithPos<String>formatCommonNational(ValueWithPos<String> pphoneNumber)format phone number in common national format with cursor position handling.StringformatCommonNational(String pphoneNumber)format phone number in Common national format.StringformatCommonNational(String pphoneNumber, String pcountryCode)format phone number in common national format.ValueWithPos<String>formatCommonNationalWithPos(ValueWithPos<PhoneNumberData> pphoneNumberData)format phone number in common national format with cursor position handling.ValueWithPos<String>formatCommonNationalWithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)format phone number in common national format with cursor position handling.ValueWithPos<String>formatCommonWithPos(ValueWithPos<PhoneNumberData> pphoneNumberData, PhoneCountryData pcountryData)format phone number in common format with cursor position handling.ValueWithPos<String>formatCommonWithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)format phone number in common format with cursor position handling.StringformatDin5008(PhoneNumberInterface pphoneNumberData)format phone number in DIN 5008 format.StringformatDin5008(PhoneNumberInterface pphoneNumberData, PhoneCountryData pcountryData)format phone number in DIN 5008 format.StringformatDin5008(PhoneNumberInterface pphoneNumberData, String pcountryCode)format phone number in DIN 5008 format.ValueWithPos<String>formatDin5008(ValueWithPos<String> pphoneNumber)format phone number in DIN 5008 format with cursor position handling.StringformatDin5008(String pphoneNumber)format phone number in DIN 5008 format.StringformatDin5008(String pphoneNumber, String pcountryCode)format phone number in DIN 5008 format.StringformatDin5008International(PhoneNumberInterface pphoneNumberData)format phone number in DIN 5008 international format.ValueWithPos<String>formatDin5008International(ValueWithPos<String> pphoneNumber)format phone number in DIN 5008 international format with cursor position handling.StringformatDin5008International(String pphoneNumber)format phone number in DIN 5008 international format.StringformatDin5008International(String pphoneNumber, String pcountryCode)format phone number in DIN 5008 international format.ValueWithPos<String>formatDin5008InternationalWithPos(ValueWithPos<PhoneNumberData> pphoneNumberData)format phone number in DIN 5008 international format with cursor position handling.ValueWithPos<String>formatDin5008InternationalWithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)format phone number in DIN 5008 international format with cursor position handling.StringformatDin5008National(PhoneNumberInterface pphoneNumberData)format phone number in DIN 5008 national format.ValueWithPos<String>formatDin5008National(ValueWithPos<String> pphoneNumber)format phone number in DIN 5008 national format with cursor position handling.StringformatDin5008National(String pphoneNumber)format phone number in DIN 5008 national format.StringformatDin5008National(String pphoneNumber, String pcountryCode)format phone number in DIN 5008 national format.ValueWithPos<String>formatDin5008NationalWithPos(ValueWithPos<PhoneNumberData> pphoneNumberData)format phone number in DIN 5008 national format with cursor position handling.ValueWithPos<String>formatDin5008NationalWithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)format phone number in DIN 5008 national format with cursor position handling.ValueWithPos<String>formatDin5008WithPos(ValueWithPos<PhoneNumberData> pphoneNumberData, PhoneCountryData pcountryData)format phone number in DIN 5008 format with cursor position handling.ValueWithPos<String>formatDin5008WithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)format phone number in DIN 5008 format with cursor position handling.StringformatE123(PhoneNumberInterface pphoneNumberData)format phone number in E123 format.StringformatE123(PhoneNumberInterface pphoneNumberData, PhoneCountryData pcountryData)format phone number in E123 format.StringformatE123(PhoneNumberInterface pphoneNumberData, String pcountryCode)format phone number in E123 format.ValueWithPos<String>formatE123(ValueWithPos<String> pphoneNumber)format phone number in E123 format with cursor position handling.StringformatE123(String pphoneNumber)format phone number in E123 format.StringformatE123(String pphoneNumber, String pcountryCode)format phone number in E123 format.StringformatE123International(PhoneNumberInterface pphoneNumberData)format phone number in E123 international format.ValueWithPos<String>formatE123International(ValueWithPos<String> pphoneNumber)format phone number in E123 international format with cursor position handling.StringformatE123International(String pphoneNumber)format phone number in E123 international format.StringformatE123International(String pphoneNumber, String pcountryCode)format phone number in E123 international format.ValueWithPos<String>formatE123InternationalWithPos(ValueWithPos<PhoneNumberData> pphoneNumberData)format phone number in E123 international format with cursor position handling.ValueWithPos<String>formatE123InternationalWithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)format phone number in E123 international format with cursor position handling.StringformatE123National(PhoneNumberInterface pphoneNumberData)format phone number in E123 national format.ValueWithPos<String>formatE123National(ValueWithPos<String> pphoneNumber)format phone number in E123 national format with cursor position handling.StringformatE123National(String pphoneNumber)format phone number in E123 national format.StringformatE123National(String pphoneNumber, String pcountryCode)format phone number in E123 national format.ValueWithPos<String>formatE123NationalWithPos(ValueWithPos<PhoneNumberData> pphoneNumberData)format phone number in E123 national format with cursor position handling.ValueWithPos<String>formatE123NationalWithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)format phone number in E123 national format with cursor position handling.ValueWithPos<String>formatE123WithPos(ValueWithPos<PhoneNumberData> pphoneNumberData, PhoneCountryData pcountryData)format phone number in E123 format with cursor position handling.ValueWithPos<String>formatE123WithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)format phone number in E123 format with cursor position handling.LongformatIndex(PhoneNumberInterface pphoneNumberData)format phone number in URL format.LongformatIndex(String pphoneNumber)format phone number to index.StringformatMs(PhoneNumberInterface pphoneNumberData)format phone number in Microsoft canonical address format.ValueWithPos<String>formatMs(ValueWithPos<String> pphoneNumber)format phone number in Microsoft canonical address format with cursor position handling.StringformatMs(String pphoneNumber)format phone number in Microsoft canonical address format.StringformatMs(String pphoneNumber, String pcountryCode)format phone number in Microsoft canonical address format.ValueWithPos<String>formatMsWithPos(ValueWithPos<PhoneNumberData> pphoneNumberData)format phone number in Microsoft canonical address format with cursor position handling.ValueWithPos<String>formatMsWithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)format phone number in Microsoft canonical address format with cursor position handling.StringformatRfc3966(PhoneNumberInterface pphoneNumberData)format phone number in RFC 3966 format.ValueWithPos<String>formatRfc3966(ValueWithPos<String> pphoneNumber)format phone number in RFC 3966 format with cursor position handling.StringformatRfc3966(String pphoneNumber)format phone number in RFC 3966 format.StringformatRfc3966(String pphoneNumber, String pcountryCode)format phone number in RFC 3966 format.ValueWithPos<String>formatRfc3966WithPos(ValueWithPos<PhoneNumberData> pphoneNumberData)format phone number in RFC 3966 format with cursor position handling.ValueWithPos<String>formatRfc3966WithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)format phone number in RFC 3966 format with cursor position handling.StringformatUrl(PhoneNumberInterface pphoneNumberData)format phone number in URL format.ValueWithPos<String>formatUrl(ValueWithPos<String> pphoneNumber)format phone number in URL format with cursor position handling.StringformatUrl(String pphoneNumber)format phone number in URL format.StringformatUrl(String pphoneNumber, String pcountryCode)format phone number in URL format.ValueWithPos<String>formatUrlWithPos(ValueWithPos<PhoneNumberData> pphoneNumberData)format phone number in URL format with cursor position handling.ValueWithPos<String>formatUrlWithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)format phone number in URL format with cursor position handling.List<PhoneNumberData>getSuggstions(String psearch, int plimit)get suggestions.List<PhoneNumberData>getSuggstions(String psearch, int plimit, Locale plocale)get suggestions.booleanisPhoneNumberEmpty(PhoneNumberInterface pphoneNumberData)check if phone number is empty.booleanisPhoneNumberNotEmpty(PhoneNumberInterface pphoneNumberData)check if phone number is not empty.ValueWithPos<PhoneNumberData>parsePhoneNumber(ValueWithPos<String> pphoneNumber)parse phone number.ValueWithPos<PhoneNumberData>parsePhoneNumber(ValueWithPos<String> pphoneNumber, PhoneNumberInterface pphoneNumberData, PhoneCountryData pcountryData)parse phone number.ValueWithPos<PhoneNumberData>parsePhoneNumber(ValueWithPos<String> pphoneNumber, String pcountryCode)parse phone number.ValueWithPos<PhoneNumberData>parsePhoneNumber(ValueWithPos<String> pphoneNumber, String pcountryCode, Locale plocale)parse phone number.PhoneNumberDataparsePhoneNumber(String pphoneNumber)parse phone number.PhoneNumberInterfaceparsePhoneNumber(String pphoneNumber, PhoneNumberInterface pphoneNumberData)parse phone number.PhoneNumberInterfaceparsePhoneNumber(String pphoneNumber, PhoneNumberInterface pphoneNumberData, PhoneCountryData pcountryData)parse phone number.PhoneNumberDataparsePhoneNumber(String pphoneNumber, String pcountryCode)parse phone number.PhoneNumberDataparsePhoneNumber(String pphoneNumber, String pcountryCode, Locale plocale)parse phone number.voidsetCountryCode(String pcountryCode)set country code.protected abstract voidsetCountryCode(String pcountryCode, Locale plocale)set country code.
-
-
-
Field Detail
-
phoneCountryConstantsProvider
protected final PhoneCountryConstantsProvider phoneCountryConstantsProvider
-
defaultCountryData
protected PhoneCountryData defaultCountryData
-
-
Constructor Detail
-
AbstractPhoneNumberUtil
protected AbstractPhoneNumberUtil(PhoneCountryConstantsProvider phoneCountryConstantsProvider)
-
AbstractPhoneNumberUtil
protected AbstractPhoneNumberUtil(String pcountryCode, PhoneCountryConstantsProvider phoneCountryConstantsProvider)
constructor with default country.- Parameters:
pcountryCode- iso code of country
-
-
Method Detail
-
setCountryCode
public final void setCountryCode(String pcountryCode)
set country code.- Parameters:
pcountryCode- iso code of country
-
setCountryCode
protected abstract void setCountryCode(String pcountryCode, Locale plocale)
set country code.- Parameters:
pcountryCode- iso code of countryplocale- locale to read properties in the correct language
-
parsePhoneNumber
public PhoneNumberData parsePhoneNumber(String pphoneNumber)
parse phone number.- Parameters:
pphoneNumber- phone number as string- Returns:
- PhoneNumberData
-
parsePhoneNumber
public ValueWithPos<PhoneNumberData> parsePhoneNumber(ValueWithPos<String> pphoneNumber)
parse phone number.- Parameters:
pphoneNumber- phone number as string with length- Returns:
- PhoneNumberData with length
-
parsePhoneNumber
public PhoneNumberData parsePhoneNumber(String pphoneNumber, String pcountryCode)
parse phone number.- Parameters:
pphoneNumber- phone number as stringpcountryCode- iso code of country- Returns:
- PhoneNumberData
-
parsePhoneNumber
public PhoneNumberData parsePhoneNumber(String pphoneNumber, String pcountryCode, Locale plocale)
parse phone number.- Parameters:
pphoneNumber- phone number as stringpcountryCode- iso code of countryplocale- locale to read properties in the correct language- Returns:
- PhoneNumberData
-
parsePhoneNumber
public ValueWithPos<PhoneNumberData> parsePhoneNumber(ValueWithPos<String> pphoneNumber, String pcountryCode)
parse phone number.- Parameters:
pphoneNumber- phone number as stringpcountryCode- iso code of country- Returns:
- PhoneNumberData
-
parsePhoneNumber
public ValueWithPos<PhoneNumberData> parsePhoneNumber(ValueWithPos<String> pphoneNumber, String pcountryCode, Locale plocale)
parse phone number.- Parameters:
pphoneNumber- phone number as stringpcountryCode- iso code of countryplocale- locale to read properties in the correct language- Returns:
- PhoneNumberData
-
parsePhoneNumber
public PhoneNumberInterface parsePhoneNumber(String pphoneNumber, PhoneNumberInterface pphoneNumberData)
parse phone number.- Parameters:
pphoneNumber- phone number as stringpphoneNumberData- phone number data to fill- Returns:
- PhoneNumberData, the same as in second parameter
-
parsePhoneNumber
public PhoneNumberInterface parsePhoneNumber(String pphoneNumber, PhoneNumberInterface pphoneNumberData, PhoneCountryData pcountryData)
parse phone number.- Parameters:
pphoneNumber- phone number as stringpphoneNumberData- phone number data to fillpcountryData- country data- Returns:
- PhoneNumberData, the same as in second parameter
-
parsePhoneNumber
public ValueWithPos<PhoneNumberData> parsePhoneNumber(ValueWithPos<String> pphoneNumber, PhoneNumberInterface pphoneNumberData, PhoneCountryData pcountryData)
parse phone number.- Parameters:
pphoneNumber- phone number as stringpphoneNumberData- phone number data to fillpcountryData- country data- Returns:
- PhoneNumberData, the same as in second parameter
-
formatE123
public final String formatE123(String pphoneNumber)
format phone number in E123 format.- Parameters:
pphoneNumber- phone number as String to format- Returns:
- formated phone number as String
-
formatE123
public final ValueWithPos<String> formatE123(ValueWithPos<String> pphoneNumber)
format phone number in E123 format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatE123
public final String formatE123(String pphoneNumber, String pcountryCode)
format phone number in E123 format.- Parameters:
pphoneNumber- phone number as String to formatpcountryCode- iso code of country- Returns:
- formated phone number as String
-
formatE123
public final String formatE123(PhoneNumberInterface pphoneNumberData)
format phone number in E123 format.- Parameters:
pphoneNumberData- phone number to format- Returns:
- formated phone number as String
-
formatE123
public final String formatE123(PhoneNumberInterface pphoneNumberData, String pcountryCode)
format phone number in E123 format.- Parameters:
pphoneNumberData- phone number to formatpcountryCode- iso code of country- Returns:
- formated phone number as String
-
formatE123
public final String formatE123(PhoneNumberInterface pphoneNumberData, PhoneCountryData pcountryData)
format phone number in E123 format.- Parameters:
pphoneNumberData- phone number to formatpcountryData- country data- Returns:
- formated phone number as String
-
formatE123WithPos
public final ValueWithPos<String> formatE123WithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)
format phone number in E123 format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor positionpcountryCode- iso code of country- Returns:
- formated phone number as String with new cursor position
-
formatE123WithPos
public final ValueWithPos<String> formatE123WithPos(ValueWithPos<PhoneNumberData> pphoneNumberData, PhoneCountryData pcountryData)
format phone number in E123 format with cursor position handling.- Parameters:
pphoneNumberData- phone number to format with cursor positionpcountryData- country data- Returns:
- formated phone number as String with new cursor position
-
formatE123International
public final String formatE123International(String pphoneNumber)
format phone number in E123 international format.- Parameters:
pphoneNumber- phone number as String to format- Returns:
- formated phone number as String
-
formatE123International
public final String formatE123International(String pphoneNumber, String pcountryCode)
format phone number in E123 international format.- Parameters:
pphoneNumber- phone number to formatpcountryCode- iso code of country- Returns:
- formated phone number as String
-
formatE123International
public final ValueWithPos<String> formatE123International(ValueWithPos<String> pphoneNumber)
format phone number in E123 international format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatE123International
public final String formatE123International(PhoneNumberInterface pphoneNumberData)
format phone number in E123 international format.- Parameters:
pphoneNumberData- phone number to format- Returns:
- formated phone number as String
-
formatE123InternationalWithPos
public final ValueWithPos<String> formatE123InternationalWithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)
format phone number in E123 international format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor positionpcountryCode- iso code of country- Returns:
- formated phone number as String with new cursor position
-
formatE123InternationalWithPos
public final ValueWithPos<String> formatE123InternationalWithPos(ValueWithPos<PhoneNumberData> pphoneNumberData)
format phone number in E123 international format with cursor position handling.- Parameters:
pphoneNumberData- phone number to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatE123National
public final String formatE123National(String pphoneNumber)
format phone number in E123 national format.- Parameters:
pphoneNumber- phone number as String to format- Returns:
- formated phone number as String
-
formatE123National
public final ValueWithPos<String> formatE123National(ValueWithPos<String> pphoneNumber)
format phone number in E123 national format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatE123National
public final String formatE123National(String pphoneNumber, String pcountryCode)
format phone number in E123 national format.- Parameters:
pphoneNumber- phone number to formatpcountryCode- iso code of country- Returns:
- formated phone number as String
-
formatE123National
public final String formatE123National(PhoneNumberInterface pphoneNumberData)
format phone number in E123 national format.- Parameters:
pphoneNumberData- phone number to format- Returns:
- formated phone number as String
-
formatE123NationalWithPos
public final ValueWithPos<String> formatE123NationalWithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)
format phone number in E123 national format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor positionpcountryCode- iso code of country- Returns:
- formated phone number as String with new cursor position
-
formatE123NationalWithPos
public final ValueWithPos<String> formatE123NationalWithPos(ValueWithPos<PhoneNumberData> pphoneNumberData)
format phone number in E123 national format with cursor position handling.- Parameters:
pphoneNumberData- phone number to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatDin5008
public final String formatDin5008(String pphoneNumber)
format phone number in DIN 5008 format.- Parameters:
pphoneNumber- phone number as String to format- Returns:
- formated phone number as String
-
formatDin5008
public final ValueWithPos<String> formatDin5008(ValueWithPos<String> pphoneNumber)
format phone number in DIN 5008 format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatDin5008
public final String formatDin5008(String pphoneNumber, String pcountryCode)
format phone number in DIN 5008 format.- Parameters:
pphoneNumber- phone number as String to formatpcountryCode- iso code of country- Returns:
- formated phone number as String
-
formatDin5008
public final String formatDin5008(PhoneNumberInterface pphoneNumberData)
format phone number in DIN 5008 format.- Parameters:
pphoneNumberData- phone number to format- Returns:
- formated phone number as String
-
formatDin5008
public final String formatDin5008(PhoneNumberInterface pphoneNumberData, String pcountryCode)
format phone number in DIN 5008 format.- Parameters:
pphoneNumberData- phone number to formatpcountryCode- iso code of country- Returns:
- formated phone number as String
-
formatDin5008
public final String formatDin5008(PhoneNumberInterface pphoneNumberData, PhoneCountryData pcountryData)
format phone number in DIN 5008 format.- Parameters:
pphoneNumberData- phone number to formatpcountryData- country data- Returns:
- formated phone number as String
-
formatDin5008WithPos
public final ValueWithPos<String> formatDin5008WithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)
format phone number in DIN 5008 format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor positionpcountryCode- iso code of country- Returns:
- formated phone number as String with new cursor position
-
formatDin5008WithPos
public final ValueWithPos<String> formatDin5008WithPos(ValueWithPos<PhoneNumberData> pphoneNumberData, PhoneCountryData pcountryData)
format phone number in DIN 5008 format with cursor position handling.- Parameters:
pphoneNumberData- phone number to format with cursor positionpcountryData- country data- Returns:
- formated phone number as String with new cursor position
-
formatDin5008International
public final String formatDin5008International(String pphoneNumber)
format phone number in DIN 5008 international format.- Parameters:
pphoneNumber- phone number as String to format- Returns:
- formated phone number as String
-
formatDin5008International
public final ValueWithPos<String> formatDin5008International(ValueWithPos<String> pphoneNumber)
format phone number in DIN 5008 international format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatDin5008International
public final String formatDin5008International(String pphoneNumber, String pcountryCode)
format phone number in DIN 5008 international format.- Parameters:
pphoneNumber- phone number to formatpcountryCode- iso code of country- Returns:
- formated phone number as String
-
formatDin5008International
public final String formatDin5008International(PhoneNumberInterface pphoneNumberData)
format phone number in DIN 5008 international format.- Parameters:
pphoneNumberData- phone number to format- Returns:
- formated phone number as String
-
formatDin5008InternationalWithPos
public final ValueWithPos<String> formatDin5008InternationalWithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)
format phone number in DIN 5008 international format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor positionpcountryCode- iso code of country- Returns:
- formated phone number as String with new cursor position
-
formatDin5008InternationalWithPos
public final ValueWithPos<String> formatDin5008InternationalWithPos(ValueWithPos<PhoneNumberData> pphoneNumberData)
format phone number in DIN 5008 international format with cursor position handling.- Parameters:
pphoneNumberData- phone number to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatDin5008National
public final String formatDin5008National(String pphoneNumber)
format phone number in DIN 5008 national format.- Parameters:
pphoneNumber- phone number as String to format- Returns:
- formated phone number as String
-
formatDin5008National
public final ValueWithPos<String> formatDin5008National(ValueWithPos<String> pphoneNumber)
format phone number in DIN 5008 national format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatDin5008National
public final String formatDin5008National(String pphoneNumber, String pcountryCode)
format phone number in DIN 5008 national format.- Parameters:
pphoneNumber- phone number to formatpcountryCode- iso code of country- Returns:
- formated phone number as String
-
formatDin5008National
public final String formatDin5008National(PhoneNumberInterface pphoneNumberData)
format phone number in DIN 5008 national format.- Parameters:
pphoneNumberData- phone number to format- Returns:
- formated phone number as String
-
formatDin5008NationalWithPos
public final ValueWithPos<String> formatDin5008NationalWithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)
format phone number in DIN 5008 national format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor positionpcountryCode- iso code of country- Returns:
- formated phone number as String with new cursor position
-
formatDin5008NationalWithPos
public final ValueWithPos<String> formatDin5008NationalWithPos(ValueWithPos<PhoneNumberData> pphoneNumberData)
format phone number in DIN 5008 national format with cursor position handling.- Parameters:
pphoneNumberData- phone number to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatRfc3966
public final String formatRfc3966(String pphoneNumber)
format phone number in RFC 3966 format.- Parameters:
pphoneNumber- phone number as String to format- Returns:
- formated phone number as String
-
formatRfc3966
public final String formatRfc3966(String pphoneNumber, String pcountryCode)
format phone number in RFC 3966 format.- Parameters:
pphoneNumber- phone number to formatpcountryCode- iso code of country- Returns:
- formated phone number as String
-
formatRfc3966
public final ValueWithPos<String> formatRfc3966(ValueWithPos<String> pphoneNumber)
format phone number in RFC 3966 format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatRfc3966
public final String formatRfc3966(PhoneNumberInterface pphoneNumberData)
format phone number in RFC 3966 format.- Parameters:
pphoneNumberData- phone number to format- Returns:
- formated phone number as String
-
formatRfc3966WithPos
public final ValueWithPos<String> formatRfc3966WithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)
format phone number in RFC 3966 format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor positionpcountryCode- iso code of country- Returns:
- formated phone number as String with new cursor position
-
formatRfc3966WithPos
public final ValueWithPos<String> formatRfc3966WithPos(ValueWithPos<PhoneNumberData> pphoneNumberData)
format phone number in RFC 3966 format with cursor position handling.- Parameters:
pphoneNumberData- phone number to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatMs
public final String formatMs(String pphoneNumber)
format phone number in Microsoft canonical address format.- Parameters:
pphoneNumber- phone number as String to format- Returns:
- formated phone number as String
-
formatMs
public final String formatMs(String pphoneNumber, String pcountryCode)
format phone number in Microsoft canonical address format.- Parameters:
pphoneNumber- phone number to formatpcountryCode- iso code of country- Returns:
- formated phone number as String
-
formatMs
public final ValueWithPos<String> formatMs(ValueWithPos<String> pphoneNumber)
format phone number in Microsoft canonical address format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatMs
public final String formatMs(PhoneNumberInterface pphoneNumberData)
format phone number in Microsoft canonical address format.- Parameters:
pphoneNumberData- phone number to format- Returns:
- formated phone number as String
-
formatMsWithPos
public final ValueWithPos<String> formatMsWithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)
format phone number in Microsoft canonical address format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor positionpcountryCode- iso code of country- Returns:
- formated phone number as String with new cursor position
-
formatMsWithPos
public final ValueWithPos<String> formatMsWithPos(ValueWithPos<PhoneNumberData> pphoneNumberData)
format phone number in Microsoft canonical address format with cursor position handling.- Parameters:
pphoneNumberData- phone number to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatUrl
public final String formatUrl(String pphoneNumber)
format phone number in URL format.- Parameters:
pphoneNumber- phone number as String to format- Returns:
- formated phone number as String
-
formatUrl
public final String formatUrl(String pphoneNumber, String pcountryCode)
format phone number in URL format.- Parameters:
pphoneNumber- phone number to formatpcountryCode- iso code of country- Returns:
- formated phone number as String
-
formatUrl
public final ValueWithPos<String> formatUrl(ValueWithPos<String> pphoneNumber)
format phone number in URL format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatUrl
public final String formatUrl(PhoneNumberInterface pphoneNumberData)
format phone number in URL format.- Parameters:
pphoneNumberData- phone number to format- Returns:
- formated phone number as String
-
formatUrlWithPos
public final ValueWithPos<String> formatUrlWithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)
format phone number in URL format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor positionpcountryCode- iso code of country- Returns:
- formated phone number as String with new cursor position
-
formatUrlWithPos
public final ValueWithPos<String> formatUrlWithPos(ValueWithPos<PhoneNumberData> pphoneNumberData)
format phone number in URL format with cursor position handling.- Parameters:
pphoneNumberData- phone number to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatCommon
public final String formatCommon(String pphoneNumber)
format phone number in Common format.- Parameters:
pphoneNumber- phone number as String to format- Returns:
- formated phone number as String
-
formatCommon
public final ValueWithPos<String> formatCommon(ValueWithPos<String> pphoneNumber)
format phone number in common format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatCommon
public final String formatCommon(PhoneNumberInterface pphoneNumberData)
format phone number in common format.- Parameters:
pphoneNumberData- phone number to format- Returns:
- formated phone number as String
-
formatCommon
public final String formatCommon(String pphoneNumber, String pcountryCode)
format phone number in common format.- Parameters:
pphoneNumber- phone number to formatpcountryCode- iso code of country- Returns:
- formated phone number as String
-
formatCommon
public final String formatCommon(PhoneNumberInterface pphoneNumberData, String pcountryCode)
format phone number in common format.- Parameters:
pphoneNumberData- phone number to formatpcountryCode- iso code of country- Returns:
- formated phone number as String
-
formatCommon
public final String formatCommon(PhoneNumberInterface pphoneNumberData, PhoneCountryData pcountryData)
format phone number in common format.- Parameters:
pphoneNumberData- phone number to formatpcountryData- country data- Returns:
- formated phone number as String
-
formatCommonWithPos
public final ValueWithPos<String> formatCommonWithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)
format phone number in common format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor positionpcountryCode- iso code of country- Returns:
- formated phone number as String with new cursor position
-
formatCommonWithPos
public final ValueWithPos<String> formatCommonWithPos(ValueWithPos<PhoneNumberData> pphoneNumberData, PhoneCountryData pcountryData)
format phone number in common format with cursor position handling.- Parameters:
pphoneNumberData- phone number to format with cursor positionpcountryData- country data- Returns:
- formated phone number as String with new cursor position
-
formatCommonInternational
public final String formatCommonInternational(String pphoneNumber)
format phone number in Common international format.- Parameters:
pphoneNumber- phone number as String to format- Returns:
- formated phone number as String
-
formatCommonInternational
public final ValueWithPos<String> formatCommonInternational(ValueWithPos<String> pphoneNumber)
format phone number in common international format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatCommonInternational
public final String formatCommonInternational(String pphoneNumber, String pcountryCode)
format phone number in common international format.- Parameters:
pphoneNumber- phone number to formatpcountryCode- iso code of country- Returns:
- formated phone number as String
-
formatCommonInternational
public final String formatCommonInternational(PhoneNumberInterface pphoneNumberData)
format phone number in Common international format.- Parameters:
pphoneNumberData- phone number to format- Returns:
- formated phone number as String
-
formatCommonInternationalWithPos
public final ValueWithPos<String> formatCommonInternationalWithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)
format phone number in common international format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor positionpcountryCode- iso code of country- Returns:
- formated phone number as String with new cursor position
-
formatCommonInternationalWithPos
public final ValueWithPos<String> formatCommonInternationalWithPos(ValueWithPos<PhoneNumberData> pphoneNumberData)
format phone number in common international format with cursor position handling.- Parameters:
pphoneNumberData- phone number to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatCommonNational
public final String formatCommonNational(String pphoneNumber)
format phone number in Common national format.- Parameters:
pphoneNumber- phone number as String to format- Returns:
- formated phone number as String
-
formatCommonNational
public final String formatCommonNational(String pphoneNumber, String pcountryCode)
format phone number in common national format.- Parameters:
pphoneNumber- phone number to formatpcountryCode- iso code of country- Returns:
- formated phone number as String
-
formatCommonNational
public final ValueWithPos<String> formatCommonNational(ValueWithPos<String> pphoneNumber)
format phone number in common national format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatCommonNational
public final String formatCommonNational(PhoneNumberInterface pphoneNumberData)
format phone number in Common national format.- Parameters:
pphoneNumberData- phone number to format- Returns:
- formated phone number as String
-
formatCommonNationalWithPos
public final ValueWithPos<String> formatCommonNationalWithPos(ValueWithPos<String> pphoneNumber, String pcountryCode)
format phone number in common national format with cursor position handling.- Parameters:
pphoneNumber- phone number as String to format with cursor positionpcountryCode- iso code of country- Returns:
- formated phone number as String with new cursor position
-
formatCommonNationalWithPos
public final ValueWithPos<String> formatCommonNationalWithPos(ValueWithPos<PhoneNumberData> pphoneNumberData)
format phone number in common national format with cursor position handling.- Parameters:
pphoneNumberData- phone number to format with cursor position- Returns:
- formated phone number as String with new cursor position
-
formatIndex
public final Long formatIndex(String pphoneNumber)
format phone number to index.- Parameters:
pphoneNumber- phone number as String to format- Returns:
- formated phone number as Long
-
formatIndex
public final Long formatIndex(PhoneNumberInterface pphoneNumberData)
format phone number in URL format.- Parameters:
pphoneNumberData- phone number to format- Returns:
- formated phone number as Long
-
isPhoneNumberEmpty
public final boolean isPhoneNumberEmpty(PhoneNumberInterface pphoneNumberData)
check if phone number is empty.- Parameters:
pphoneNumberData- phone number to check- Returns:
- true if number is empty
-
isPhoneNumberNotEmpty
public final boolean isPhoneNumberNotEmpty(PhoneNumberInterface pphoneNumberData)
check if phone number is not empty.- Parameters:
pphoneNumberData- phone number to check- Returns:
- true if number is not empty
-
getSuggstions
public final List<PhoneNumberData> getSuggstions(String psearch, int plimit)
get suggestions.- Parameters:
psearch- search stringplimit- limit entries- Returns:
- list of phone number data
-
getSuggstions
public final List<PhoneNumberData> getSuggstions(String psearch, int plimit, Locale plocale)
get suggestions.- Parameters:
psearch- search stringplimit- limit entriesplocale- locale- Returns:
- list of phone number data
-
-