Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol
Interface PhoneNumberI18nService

All Known Implementing Classes:
PhoneNumberI18nServiceImpl

public interface PhoneNumberI18nService

Represents an OSGi service which aids the parsing, formatting and validating of international phone numbers.

Author:
Lyubomir Marinov

Method Summary
 boolean isPhoneNumber(String possibleNumber)
          Indicates if the given string is possibly a phone number.
 String normalize(String phoneNumber)
          Normalizes a String phone number by converting alpha characters to their respective digits on a keypad and then stripping non-digit characters.
 boolean phoneNumbersMatch(String aPhoneNumber, String bPhoneNumber)
          Determines whether two String phone numbers match.
 

Method Detail

normalize

String normalize(String phoneNumber)
Normalizes a String phone number by converting alpha characters to their respective digits on a keypad and then stripping non-digit characters.

Parameters:
phoneNumber - a String which represents a phone number to normalize
Returns:
a String which is a normalized form of the specified phoneNumber

phoneNumbersMatch

boolean phoneNumbersMatch(String aPhoneNumber,
                          String bPhoneNumber)
Determines whether two String phone numbers match.

Parameters:
aPhoneNumber - a String which represents a phone number to match to bPhoneNumber
bPhoneNumber - a String which represents a phone number to match to aPhoneNumber
Returns:
true if the specified Strings match as phone numbers; otherwise, false

isPhoneNumber

boolean isPhoneNumber(String possibleNumber)
Indicates if the given string is possibly a phone number.

Parameters:
possibleNumber - the string to be verified
Returns:
true if the given string is a phone number, false otherwise

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.