Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.sample.tutorial.update.database
Class Contact  view Contact download Contact.java

java.lang.Object
  extended bycom.sample.tutorial.update.database.Contact

public class Contact
extends java.lang.Object

Contains information on a single contact.


Field Summary
protected  java.lang.String email
          The email address of this contact.
protected  java.lang.String firstName
          The first name of this contact.
protected  int id
          The unique identifier for this contact.
protected  java.lang.String lastName
          The last name of this contact.
 
Constructor Summary
Contact()
          Constructs an empty Contact.
Contact(int setId, java.lang.String setFirstName, java.lang.String setLastName, java.lang.String setEmail)
          Constructs an Contact from the supplied values.
 
Method Summary
 void getData(Contact data)
          Copies all attributes into the supplied Contact.
 java.lang.String getEmail()
          Returns the email address of this contact.
 java.lang.String getFirstName()
          Returns the first name of this contact.
 int getId()
          Returns the identifier for this contact.
 java.lang.String getLastName()
          Returns the last name of this contact.
 void setData(Contact data)
          Copies all attributes from the supplied Contact.
 void setEmail(java.lang.String setEmail)
          Sets the email address of this contact.
 void setFirstName(java.lang.String setFirstName)
          Sets the first name of this contact.
 void setId(int setId)
          Sets the identifier for this contact.
 void setLastName(java.lang.String setLastName)
          Sets the last name of this contact.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected int id
The unique identifier for this contact.


firstName

protected java.lang.String firstName
The first name of this contact.


lastName

protected java.lang.String lastName
The last name of this contact.


email

protected java.lang.String email
The email address of this contact.

Constructor Detail

Contact

public Contact()
Constructs an empty Contact.


Contact

public Contact(int setId,
               java.lang.String setFirstName,
               java.lang.String setLastName,
               java.lang.String setEmail)
Constructs an Contact from the supplied values.

Method Detail

getId

public int getId()
Returns the identifier for this contact.


setId

public void setId(int setId)
Sets the identifier for this contact.


getFirstName

public java.lang.String getFirstName()
Returns the first name of this contact.


setFirstName

public void setFirstName(java.lang.String setFirstName)
Sets the first name of this contact.


getLastName

public java.lang.String getLastName()
Returns the last name of this contact.


setLastName

public void setLastName(java.lang.String setLastName)
Sets the last name of this contact.


getEmail

public java.lang.String getEmail()
Returns the email address of this contact.


setEmail

public void setEmail(java.lang.String setEmail)
Sets the email address of this contact.


getData

public void getData(Contact data)
Copies all attributes into the supplied Contact.


setData

public void setData(Contact data)
Copies all attributes from the supplied Contact.


toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).