Class AddressBaseType
java.lang.Object
org.projecthusky.common.basetypes.AddressBaseType
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Address
This class provides the basic information for a postal address according to the HL7 address entity. This class does
not have any foreign framework dependencies and is therefore one of the base elements of the Husky.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AddressBaseType.Builder
builder()
Creates builder to buildAddressBaseType
.boolean
Checks whether the two objects are equal (based on their content).Gets the additional locator.Gets the building number.getCity()
Gets the city.Gets the country.Gets the null flavor.Gets the postal code.Gets the post box.getState()
Gets the state.Gets the street address line 1.Gets the street address line 2.Gets the street name.getUsage()
Gets type of usage (such as private, business, ...).int
hashCode()
Hash code.boolean
Checks if the current instance is null flavored.void
setAdditionalLocator
(String additionalLocator) Sets the additional locator.void
setBuildingNumber
(String buildingNumber) Sets the building number.void
Sets the city.void
setCountry
(String country) Sets the country.See gettergetCountry()
for more details.void
setNullFlavor
(NullFlavor nullFlavor) Sets the null flavor.void
setPostalCode
(String postalCode) Sets the postal code.void
setPostBox
(String postBox) Sets the post box.void
Sets the state See gettergetState()
for more details.void
setStreetAddressLine1
(String streetAddressLine1) Sets the street address line 1.void
setStreetAddressLine2
(String streetAddressLine2) Sets the street address line 2.void
setStreetName
(String streetName) Sets the street name.See gettergetStreetName()
for more details.void
setUsage
(PostalAddressUse usage) Sets the type of usage.toString()
Builds a string of the whole address.
-
Constructor Details
-
AddressBaseType
public AddressBaseType()Instantiates a new AddressBaseType. Default constructor.
-
-
Method Details
-
builder
Creates builder to buildAddressBaseType
.- Returns:
- created builder
-
equals
Checks whether the two objects are equal (based on their content). -
getAdditionalLocator
Gets the additional locator. This can be a unit designator, such as apartment number, suite number, or floor. There may be several unit designators in an address (e.g., "3rd floor, Appt. 342"). This can also be a designator pointing away from the location, rather than specifying a smaller location within some larger one (e.g., Dutch "t.o." means "opposite to" for house boats located across the street facing houses).- Returns:
- the additional locator
-
setAdditionalLocator
Sets the additional locator. See gettergetAdditionalLocator()
for more details.- Parameters:
additionalLocator
- the new additional locator
-
getBuildingNumber
Gets the building number. The number of a building, house or lot alongside the street. Also known as "primary street number". This does not number the street but rather the building.- Returns:
- the building number
-
setBuildingNumber
Sets the building number. See gettergetBuildingNumber()
for more details.- Parameters:
buildingNumber
- the new building number
-
getCity
Gets the city. The name of the city, town, village, or other community or delivery center.- Returns:
- the city
-
setCity
Sets the city. See gettergetCity()
for more details.- Parameters:
city
- the new city
-
getCountry
Gets the country.- Returns:
- the country
-
setCountry
Sets the country.See gettergetCountry()
for more details.- Parameters:
country
- the new country
-
getNullFlavor
Gets the null flavor.- Returns:
- the null flavor
-
getPostalCode
Gets the postal code. A postal code designating a region defined by the postal service.- Returns:
- the postal code
-
setPostalCode
Sets the postal code. See gettergetPostalCode()
for more details.- Parameters:
postalCode
- the new postal code
-
getPostBox
Gets the post box. A numbered box located in a post station.- Returns:
- the post box
-
setPostBox
Sets the post box. See gettergetPostBox()
for more details.- Parameters:
postBox
- the new post box
-
getState
Gets the state. A sub-unit of a country with limited sovereignty in a federally organized country (e.g. Switzerland: canton).- Returns:
- the state
-
setState
Sets the state See gettergetState()
for more details.- Parameters:
state
- the new state
-
getStreetAddressLine1
Gets the street address line 1. Can be used for an additional locator, a delivery address or a street address.- Returns:
- the street address line 1
-
setStreetAddressLine1
Sets the street address line 1. See gettergetStreetAddressLine1()
for more details.- Parameters:
streetAddressLine1
- the new street address line 1
-
getStreetAddressLine2
Gets the street address line 2. Can be used for an additional locator, a delivery address or a street address.- Returns:
- the street address line 2
-
setStreetAddressLine2
Sets the street address line 2. See gettergetStreetAddressLine2()
for more details.- Parameters:
streetAddressLine2
- the new street address line 2
-
getStreetName
Gets the street name. The name of a roadway or artery recognized by a municipality.- Returns:
- the street name
-
setStreetName
Sets the street name.See gettergetStreetName()
for more details.- Parameters:
streetName
- the new street name
-
getUsage
Gets type of usage (such as private, business, ...).- Returns:
- the usage
-
setUsage
Sets the type of usage. See gettergetUsage()
for more details.- Parameters:
usage
- the new usage
-
hashCode
public int hashCode()Hash code. -
isNullFlavor
public boolean isNullFlavor()Checks if the current instance is null flavored.- Returns:
- true, if is null flavor
-
setNullFlavor
Sets the null flavor.- Parameters:
nullFlavor
- the new null flavor
-
toString
Builds a string of the whole address.
-