TelephoneNumber.java :  » XML-UI » xui32 » com » xoetrope » pm » Java Open Source

Java Open Source » XML UI » xui32 
xui32 » com » xoetrope » pm » TelephoneNumber.java
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;
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.