Class AbstractPhoneNumberUtil

  • Direct Known Subclasses:
    PhoneNumberUtil

    public abstract class AbstractPhoneNumberUtil
    extends Object
    Abstract Phone Number Util, format and parse phone numbers.
    Author:
    Manfred Tremmel
    • Constructor Detail

      • 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 country
        plocale - 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 string
        pcountryCode - iso code of country
        Returns:
        PhoneNumberData
      • parsePhoneNumber

        public PhoneNumberData parsePhoneNumber​(String pphoneNumber,
                                                String pcountryCode,
                                                Locale plocale)
        parse phone number.
        Parameters:
        pphoneNumber - phone number as string
        pcountryCode - iso code of country
        plocale - 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 string
        pcountryCode - 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 string
        pcountryCode - iso code of country
        plocale - 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 string
        pphoneNumberData - 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 string
        pphoneNumberData - phone number data to fill
        pcountryData - 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 format
        pcountryCode - 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 format
        pcountryCode - 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 format
        pcountryData - 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 position
        pcountryCode - 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 position
        pcountryData - 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 format
        pcountryCode - 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 position
        pcountryCode - 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 format
        pcountryCode - 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 position
        pcountryCode - 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 format
        pcountryCode - 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 format
        pcountryCode - 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 format
        pcountryData - 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 position
        pcountryCode - 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 position
        pcountryData - 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 format
        pcountryCode - 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 position
        pcountryCode - 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 format
        pcountryCode - 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 position
        pcountryCode - 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 format
        pcountryCode - 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 position
        pcountryCode - 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 format
        pcountryCode - 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 position
        pcountryCode - 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 format
        pcountryCode - 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 position
        pcountryCode - 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 format
        pcountryCode - 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 format
        pcountryCode - 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 format
        pcountryData - 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 position
        pcountryCode - 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 position
        pcountryData - 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 format
        pcountryCode - 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 position
        pcountryCode - 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 format
        pcountryCode - 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 position
        pcountryCode - 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 string
        plimit - 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 string
        plimit - limit entries
        plocale - locale
        Returns:
        list of phone number data