package com.xoetrope.pm;
/**
* A generic structure to model telephone numbers
*
* <p> Copyright (c) Xoetrope Ltd., 2001-2006, This software is licensed under
* the GNU Public License (GPL), please see license.txt for more details. If
* you make commercial use of this software you must purchase a commercial
* license from Xoetrope.</p>
* <p> $Revision: 1.2 $</p>
*/
public class TelephoneNumber extends ProjectManagementObject implements Cloneable
{
protected String number;
protected String areaCode;
protected String countryCode;
protected String extension;
/**
* Create a new telephone number
*/
public TelephoneNumber()
{
super( "TelephoneNumber" );
}
/**
* Create a copy of this telephone number object
* @return a new clone instance
*/
public Object clone() {
try {
Object cloned = super.clone();
((ProjectManagementObject)cloned).id = getNextId( "TelephoneNumber" );
return cloned;
}
catch (CloneNotSupportedException e) {
return null;
}
}
/**
* Get the local phone number
* @return the number
*/
public String getNumber()
{
return number;
}
/**
* Get the area code
* @return the code
*/
public String getAreaCode()
{
return areaCode;
}
/**
* Get the country code
* @return the code
*/
public String getCountryCode()
{
return countryCode;
}
/**
* Get the extension number
* @return the extension
*/
public String getExtension()
{
return extension;
}
/**
* Set the local number
* @param newValue the new value
*/
public void setNumber( String newValue )
{
number = newValue;
}
/**
* Set the area code
* @param newValue the new value
*/
public void setAreaCode( String newValue )
{
areaCode = newValue;
}
/**
* Set the country code
* @param newValue the new value
*/
public void setCountryCode( String newValue )
{
countryCode = newValue;
}
/**
* Set the extension
* @param newValue the new value
*/
public void setExtension( String newValue )
{
extension = newValue;
}
}
|