ca.infoway.messagebuilder.util.telephone
Class TelephoneLocalNumber

Package class diagram package TelephoneLocalNumber
java.lang.Object
  extended by ca.infoway.messagebuilder.util.telephone.TelephoneLocalNumber

public class TelephoneLocalNumber
extends Object

The seven-digit part of the telephone number, without area code.

This number is stored as 1234567 but we want to display it as 123-4567


Constructor Summary
TelephoneLocalNumber()
           
 
Method Summary
 TelephoneLocalNumber clone()
          Create a copy of the phone number.
static TelephoneLocalNumber create(String telephoneLocalNumberString)
          Create a telephone number from a string.
 String getFormattedTelephoneNumber()
          Provide a human-readable formatted phone number.
 String getTelephoneNumber()
          Get the phone number.
 void setTelephoneNumber(String telephoneNumber)
          Set the phone number with no hyphen.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TelephoneLocalNumber

public TelephoneLocalNumber()
Method Detail

create

public static TelephoneLocalNumber create(String telephoneLocalNumberString)

Create a telephone number from a string.

Parameters:
telephoneLocalNumberString - - a phone number in the format (123-4567 or 1234567).
Returns:
- a phone number object.

getTelephoneNumber

public String getTelephoneNumber()

Get the phone number. The representation has no hyphen.

Returns:
- the phone number

setTelephoneNumber

public void setTelephoneNumber(String telephoneNumber)

Set the phone number with no hyphen.

Parameters:
telephoneNumber - - the new value

getFormattedTelephoneNumber

public String getFormattedTelephoneNumber()

Provide a human-readable formatted phone number.

Returns:
- the formatted phone number

clone

public TelephoneLocalNumber clone()

Create a copy of the phone number.

Overrides:
clone in class Object
Returns:
- a copy of the phone number


Copyright © 2013. All Rights Reserved.