|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPerson
An object of this class maintains information about a single individual in the address book
Nested Class Summary | |
static class |
Person.CompareByName
Comparator for comparing two persons by alphabetical order of name |
static class |
Person.CompareByZip
Comparator for comparing two persons by order of zip code |
Constructor Summary | |
Person(java.lang.String firstName,
java.lang.String lastName,
java.lang.String address,
java.lang.String city,
java.lang.String state,
java.lang.String zip,
java.lang.String phone)
Constructor |
Method Summary | |
java.lang.String |
getAddress()
Accessor for the person's address |
java.lang.String |
getCity()
Accessor for the person's city |
java.lang.String |
getFirstName()
Accessor for the person's first name |
java.lang.String |
getLastName()
Accessor for the person's last name |
java.lang.String |
getPhone()
Accessor for the person's phone |
java.lang.String |
getState()
Accessor for the person's state |
java.lang.String |
getZip()
Accessor for the person's zip |
void |
update(java.lang.String address,
java.lang.String city,
java.lang.String state,
java.lang.String zip,
java.lang.String phone)
Update the person with new information. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Person(java.lang.String firstName, java.lang.String lastName, java.lang.String address, java.lang.String city, java.lang.String state, java.lang.String zip, java.lang.String phone)
firstName
- the person's first namelastName
- the person's last nameaddress
- the person's addresscity
- the person's citystate
- the person's statezip
- the person's zipphone
- the person's phoneMethod Detail |
public java.lang.String getFirstName()
public java.lang.String getLastName()
public java.lang.String getAddress()
public java.lang.String getCity()
public java.lang.String getState()
public java.lang.String getZip()
public java.lang.String getPhone()
public void update(java.lang.String address, java.lang.String city, java.lang.String state, java.lang.String zip, java.lang.String phone)
address
- the person's new addresscity
- the person's new citystate
- the person's new statezip
- the person's new zipphone
- the person's new phone
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |