public class PhoneNumberI18nServiceImpl extends java.lang.Object implements PhoneNumberI18nService
Constructor and Description |
---|
PhoneNumberI18nServiceImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
formatForDisplay(java.lang.String phoneNumber)
Tries to format the passed phone number into the international format.
|
boolean |
isPhoneNumber(java.lang.String possibleNumber)
Indicates if the given string is possibly a phone number.
|
java.lang.String |
normalize(java.lang.String possibleNumber)
Normalizes a String which may be a phone number or a identifier
by removing useless characters and, if necessary, replacing the alpahe
characters in corresponding dial pad numbers.
|
boolean |
phoneNumbersMatch(java.lang.String aPhoneNumber,
java.lang.String bPhoneNumber)
Determines whether two String phone numbers match.
|
public java.lang.String normalize(java.lang.String possibleNumber)
normalize
in interface PhoneNumberI18nService
possibleNumber
- a String which may represents a phone
number or an identifier to normalize.public boolean phoneNumbersMatch(java.lang.String aPhoneNumber, java.lang.String bPhoneNumber)
phoneNumbersMatch
in interface PhoneNumberI18nService
aPhoneNumber
- a String which represents a phone number to
match to bPhoneNumberbPhoneNumber
- a String which represents a phone number to
match to aPhoneNumberpublic java.lang.String formatForDisplay(java.lang.String phoneNumber)
formatForDisplay
in interface PhoneNumberI18nService
phoneNumber
- The phone number to format.public boolean isPhoneNumber(java.lang.String possibleNumber)
isPhoneNumber
in interface PhoneNumberI18nService
possibleNumber
- the string to be verified
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.