|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ps6.Address
public class Address
An Address is an immutable record type defining a location.
num
- : integer // number of the building along the street
name
- : String // name of the street
zipcode
- : String // US ZIP code
Constructor Summary | |
---|---|
Address(int num,
String name,
String zipcode)
Address Constructor |
Method Summary | |
---|---|
boolean |
equals(Address other)
|
boolean |
equals(Object other)
|
String |
getName()
Get the name of the street |
int |
getNum()
Get the street number |
String |
getZipcode()
Get the zipcode for the street |
int |
hashCode()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Address(int num, String name, String zipcode)
Method Detail |
---|
public int getNum()
public String getName()
public String getZipcode()
public boolean equals(Object other)
equals
in class Object
public boolean equals(Address other)
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |