|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--orderprocessing.Address
This class maintains information for an address
History date description ----- ----------- 11/12/99 Creation, break out from customer classThis class represents addresses, usually customer addresses. It is useful only for addresses in the U.S. however.
Constructor Summary | |
Address(java.lang.String all,
java.lang.String separator)
Create an address from a single encoded string |
|
Address(java.lang.String name,
java.lang.String street,
java.lang.String city,
java.lang.String state,
java.lang.String zip)
Create an address from a set of strings representing the parts of the address |
Method Summary | |
java.lang.String |
city()
Retrieve the name of the city |
void |
city(java.lang.String city)
Change the city associated with this address |
java.lang.Object |
clone()
|
void |
display()
Display this address info on standard output |
boolean |
equals(java.lang.Object other)
|
int |
hashCode()
|
java.lang.String |
name()
Retrieve the name associated with this address |
void |
name(java.lang.String name)
Change the name associated with this address |
java.lang.String |
state()
Retrieve the state's two character code |
void |
state(java.lang.String state)
Change the state for this address |
java.lang.String |
street()
Retrieve the number and street for this address |
void |
street(java.lang.String street)
Change the number and street of this address |
java.lang.String |
toString()
|
java.lang.String |
zip()
retrieve the postal (zip) code for this address |
void |
zip(java.lang.String zip)
Change the zip code for this address |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Address(java.lang.String name, java.lang.String street, java.lang.String city, java.lang.String state, java.lang.String zip)
name
- the customer namestreet
- the street address of the customercity
- the city of the customerstate
- the state (US) of the customerzip
- the zip code of the customerpublic Address(java.lang.String all, java.lang.String separator)
all
- the complete address of the customer beginning with the nameMethod Detail |
public java.lang.Object clone()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void display()
public java.lang.String name()
public java.lang.String street()
public java.lang.String city()
public java.lang.String state()
public java.lang.String zip()
public void name(java.lang.String name)
name
- the new namepublic void street(java.lang.String street)
street
- the number and streetpublic void city(java.lang.String city)
city
- the new citypublic void state(java.lang.String state)
state
- the two character code for this addreas.public void zip(java.lang.String zip)
zip
- the new zip codepublic java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |