com.compoze.collab.groupware
Class PhoneNumber

java.lang.Object
  extended by com.compoze.collab.groupware.PhoneNumber

public class PhoneNumber
extends Object

This class is a wrapper for phone number representations.


Constructor Summary
PhoneNumber(String sPhoneNumber)
          Constructor.
PhoneNumber(String sCountryCode, String sAreaCode, String sNumber, String sExtension)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
          Tests the equality with another phone number.
 String getAreaCode()
          Gets the area code.
 String getCountryCode()
          Gets the country code.
 String getExtension()
          Gets the extension.
 String getNumber()
          Gets the phone number.
 String toString()
          Gets the string representation of the phone number.
 String toStringFormatted(boolean bDots, boolean bAreaCodeParens)
          Gets the formatted string of the phone number.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PhoneNumber

public PhoneNumber(String sCountryCode,
                   String sAreaCode,
                   String sNumber,
                   String sExtension)
Constructor.

Parameters
sCountryCode - the country code
sAreaCode - the area code
sNumber - the phone number
sExtension - the phone extension

PhoneNumber

public PhoneNumber(String sPhoneNumber)
Constructor.

Parameters
sPhoneNumber - the phone number
Method Detail

getAreaCode

public String getAreaCode()
Gets the area code.

Returns
the area code string (may be null)

getCountryCode

public String getCountryCode()
Gets the country code.

Returns
the country code (may be null)

getNumber

public String getNumber()
Gets the phone number.

Returns
the number (may be null)

getExtension

public String getExtension()
Gets the extension.

Returns
the extension (may be null)

toString

public String toString()
Gets the string representation of the phone number.

Overrides:
toString in class Object
Returns
the string representation

toStringFormatted

public String toStringFormatted(boolean bDots,
                                boolean bAreaCodeParens)
Gets the formatted string of the phone number.

Parameters
bDots - use dots as the delimeter
bAreaCodeParens - place parentheses around the area code
Returns
the formatted phone number

equals

public boolean equals(Object obj)
Tests the equality with another phone number.

Overrides:
equals in class Object


Copyright © 2006 BEA Systems, Inc. All Rights Reserved