public class Address
extends java.lang.Object
Constructor and Description |
---|
Address(java.lang.String street,
java.lang.String city,
java.lang.String state,
java.lang.String zipCode)
Create an address with the given values
|
Address(java.lang.String street,
java.lang.String suiteOrApartment,
java.lang.String city,
java.lang.String state,
java.lang.String zipCode)
Create an address with the given values
|
Address(java.lang.String street,
java.lang.String suiteOrApartment,
java.lang.String city,
java.lang.String state,
java.lang.String zipCode,
java.lang.String county,
java.lang.String country)
Create an address with the given values
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getAddressee()
Returns the addressee
|
java.lang.String |
getCity()
Returns the city
|
java.lang.String |
getCountry()
Returns the country
|
java.lang.String |
getCounty()
Returns the county
|
java.lang.String |
getState()
Returns the state
|
java.lang.String |
getStreet()
Returns the street
|
java.lang.String |
getSuiteOrApartment()
Returns the suite or apartment
|
java.lang.String |
getZipCode()
Returns the zip code
|
int |
hashCode() |
void |
setAddressee(java.lang.String addressee)
Sets the addressee
|
void |
setCity(java.lang.String city)
Sets the city
|
void |
setCountry(java.lang.String country)
Sets the country
|
void |
setCounty(java.lang.String county)
Sets the county
|
void |
setState(java.lang.String state)
Sets the state
|
void |
setStreet(java.lang.String street)
Sets the street
|
void |
setSuiteOrApartment(java.lang.String suiteOrApartment)
Sets the suite or apartment
|
void |
setZipCode(java.lang.String zipCode)
Sets the zip code
|
java.lang.String |
toComponentString()
Returns a string that clearly shows what the value of each part of the address is, rather than the correctly formatted address
|
java.lang.String |
toString() |
java.lang.String |
toWellFormattedString()
Outputs the address as it would appear on a letter.
|
public Address(java.lang.String street, java.lang.String city, java.lang.String state, java.lang.String zipCode)
street
- The street addresscity
- The citystate
- The statezipCode
- The zip codepublic Address(@Nullable java.lang.String street, @Nullable java.lang.String suiteOrApartment, @Nullable java.lang.String city, @Nullable java.lang.String state, @Nullable java.lang.String zipCode)
street
- The street addresssuiteOrApartment
- The suite or apartment. This is just the second address line, if there should be onecity
- The citystate
- The statezipCode
- The zip codepublic Address(@Nullable java.lang.String street, @Nullable java.lang.String suiteOrApartment, @Nullable java.lang.String city, @Nullable java.lang.String state, @Nullable java.lang.String zipCode, @Nullable java.lang.String county, @Nullable java.lang.String country)
street
- The street addresssuiteOrApartment
- The suite or apartment. This is just the second address line, if there should be onecity
- The citystate
- The statezipCode
- The zip codecounty
- The countycountry
- The country@Nullable public java.lang.String getAddressee()
public void setAddressee(@Nullable java.lang.String addressee)
addressee
- The addressee@Nullable public java.lang.String getStreet()
public void setStreet(java.lang.String street)
street
- The street@Nullable public java.lang.String getSuiteOrApartment()
public void setSuiteOrApartment(java.lang.String suiteOrApartment)
suiteOrApartment
- The suite or apartment@Nullable public java.lang.String getCity()
public void setCity(java.lang.String city)
city
- The city@Nullable public java.lang.String getState()
public void setState(java.lang.String state)
state
- The state@Nullable public java.lang.String getZipCode()
public void setZipCode(java.lang.String zipCode)
zipCode
- The zip code@Nullable public java.lang.String getCounty()
public void setCounty(java.lang.String county)
county
- The county@Nullable public java.lang.String getCountry()
public void setCountry(java.lang.String country)
country
- The country@NotNull public java.lang.String toWellFormattedString()
@NotNull public java.lang.String toComponentString()
@NotNull public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object