public class ContactData
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
email
The email address.
|
protected java.lang.String |
icq
The icq no.
|
protected java.lang.String |
name
The name.
|
protected java.lang.String |
phone
The mobile phone no.
|
Constructor and Description |
---|
ContactData()
Constructor for ContactData.
|
ContactData(java.lang.String name,
java.lang.String email,
java.lang.String phone,
java.lang.String icq)
Create a new contact.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEmail()
Get the email.
|
java.lang.String |
getIcq()
Getter for icq
|
java.lang.String |
getName()
Get the name.
|
java.lang.String |
getPhone()
Get the phone no.
|
void |
setEmail(java.lang.String email)
Set the email.
|
void |
setIcq(java.lang.String icq)
Setter for icq.
|
void |
setName(java.lang.String name)
Set the name.
|
void |
setPhone(java.lang.String phone)
Set the phone no.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
protected java.lang.String name
protected java.lang.String email
protected java.lang.String phone
protected java.lang.String icq
public ContactData()
public ContactData(java.lang.String name, java.lang.String email, java.lang.String phone, java.lang.String icq)
name
- email
- The email.phone
- The phone.icq
- public java.lang.String getName()
public void setName(java.lang.String name)
name
- The name.public java.lang.String getEmail()
public void setEmail(java.lang.String email)
email
- The email.public java.lang.String getPhone()
public void setPhone(java.lang.String phone)
phone
- The phone no.public java.lang.String getIcq()
public void setIcq(java.lang.String icq)
icq
- The ContactData.java value to setpublic java.lang.String toString()
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation of the object.