net.sourceforge.jsdp.util
Class Contact

java.lang.Object
  extended by net.sourceforge.jsdp.util.Contact
All Implemented Interfaces:
Serializable, Cloneable

public class Contact
extends Object
implements Cloneable, Serializable

A representation of a contact information.

Since:
1.0
Version:
1.0
Author:
Claudio Di Vita
See Also:
Serialized Form

Field Summary
protected  String address
          The e-mail address of the contact
protected  String personal
          The personal information of the contact
 
Constructor Summary
protected Contact()
          Creates a new Contact.
  Contact(String info)
          Creates a new Contact.
  Contact(String address, String personal)
          Creates a new Contact.
 
Method Summary
 Object clone()
          Returns a clone of this contact.
 String getAddress()
          Returns the e-mail address.
 String getPersonal()
          Returns the personal information.
 void setAddress(String address)
          Sets the e-mail address of the contact.
 void setPersonal(String personal)
          Sets the personal information of the contact.
 String toString()
          Returns a string representation of the contact.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

address

protected String address
The e-mail address of the contact


personal

protected String personal
The personal information of the contact

Constructor Detail

Contact

protected Contact()
Creates a new Contact.


Contact

public Contact(String info)
        throws SDPException
Creates a new Contact.

Parameters:
info - the contact information
Throws:
SDPException - if the contact information aren't valid

Contact

public Contact(String address,
               String personal)
        throws SDPException
Creates a new Contact.

Parameters:
address - the e-mail address of the contact
personal - the personal information of the contact
Throws:
SDPException - if the e-mail address or the personal information aren't valid
Method Detail

clone

public Object clone()
Returns a clone of this contact.

Overrides:
clone in class Object
Returns:
a clone of this object

getAddress

public String getAddress()
Returns the e-mail address.

Returns:
the e-mail address of the contact

getPersonal

public String getPersonal()
Returns the personal information.

Returns:
the personal information of the contact

setAddress

public void setAddress(String address)
                throws SDPException
Sets the e-mail address of the contact.

Parameters:
address - the e-mail address to set
Throws:
SDPException - if the e-mail address is not valid

setPersonal

public void setPersonal(String personal)
                 throws SDPException
Sets the personal information of the contact.

Parameters:
personal - the personal information to set
Throws:
SDPException - if the personal information are not valid

toString

public String toString()
Returns a string representation of the contact. The representation has the form: personal <e-mail>

Overrides:
toString in class Object
Returns:
the string representation of the contact


Copyright © 2004-2008. All Rights Reserved.