|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--Name
The Name class is used to store a person's name. Currently it only supports first and last names.
This is proably overkill for such a simple object but its purpose is to demonstrate a functional object.
| Constructor Summary | |
Name()
Constructor |
|
Name(Name obj)
Clone Constructor |
|
Name(java.lang.String first,
java.lang.String last)
Full Constructor |
|
| Method Summary | |
boolean |
equals(java.lang.Object obj)
Determine if an object is equal to this object. |
java.lang.String |
getFirst()
Get the value of first. |
java.lang.String |
getLast()
Get the value of last. |
int |
hashCode()
Override the default hashCode() method. |
void |
setFirst(java.lang.String first)
Set the value of first |
void |
setLast(java.lang.String last)
Set the value of last |
java.lang.String |
toString()
Convert object to String |
| Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public Name()
public Name(Name obj)
obj - clone this object.
public Name(java.lang.String first,
java.lang.String last)
first - - First namelast - - Last name| Method Detail |
public void setFirst(java.lang.String first)
first - First namepublic java.lang.String getFirst()
public void setLast(java.lang.String last)
last - Last namepublic java.lang.String getLast()
public java.lang.String toString()
public boolean equals(java.lang.Object obj)
obj - the object to test.public int hashCode()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||