/* * Jitsi, the OpenSource Java VoIP and Instant Messaging client. * * Distributable under LGPL license. * See terms of license at gnu.org. */ package net.java.sip.communicator.service.protocol; /** * Represents an OSGi service which aids the parsing, formatting and validating * of international phone numbers. * * @author Lyubomir Marinov */ public interface PhoneNumberI18nService { /** * Normalizes a String phone number by converting alpha characters * to their respective digits on a keypad and then stripping non-digit * characters. * * @param phoneNumber a String which represents a phone number to * normalize * @return a String which is a normalized form of the specified * phoneNumber */ public String normalize(String phoneNumber); /** * Determines whether two String phone numbers match. * * @param aPhoneNumber a String which represents a phone number to * match to bPhoneNumber * @param bPhoneNumber a String which represents a phone number to * match to aPhoneNumber * @return true if the specified Strings match as phone * numbers; otherwise, false */ public boolean phoneNumbersMatch(String aPhoneNumber, String bPhoneNumber); /** * Indicates if the given string is possibly a phone number. * * @param possibleNumber the string to be verified * @return */ public boolean isPhoneNumber(String possibleNumber); }