Package com.ibm.fhir.model.type
Class Address
- java.lang.Object
-
- com.ibm.fhir.model.visitor.AbstractVisitable
-
- com.ibm.fhir.model.type.Element
-
- com.ibm.fhir.model.type.Address
-
- All Implemented Interfaces:
Visitable
@Generated("com.ibm.fhir.tools.CodeGenerator") public class Address extends Element
An address expressed using postal conventions (as opposed to GPS or other location definition formats). This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery. There are a variety of postal address formats defined around the world.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAddress.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(String elementName, int elementIndex, Visitor visitor)Accept a Visitor and invoke the appropriate visit methods.static Address.Builderbuilder()booleanequals(Object obj)StringgetCity()The name of the city, town, suburb, village or other community or delivery center.StringgetCountry()Country - a nation as commonly understood or generally accepted.StringgetDistrict()The name of the administrative area (county).List<String>getLine()This component contains the house number, apartment number, street name, street direction, P.O.PeriodgetPeriod()Time period when address was/is in use.StringgetPostalCode()A postal code designating a region defined by the postal service.StringgetState()Sub-unit of a country with limited sovereignty in a federally organized country.StringgetText()Specifies the entire address as it should be displayed e.g.AddressTypegetType()Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g.AddressUsegetUse()The purpose of this address.booleanhasChildren()inthashCode()Address.BuildertoBuilder()Create a new Builder from the contents of this Element
-
-
-
Method Detail
-
getUse
public AddressUse getUse()
The purpose of this address.- Returns:
- An immutable object of type
AddressUsethat may be null.
-
getType
public AddressType getType()
Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.- Returns:
- An immutable object of type
AddressTypethat may be null.
-
getText
public String getText()
Specifies the entire address as it should be displayed e.g. on a postal label. This may be provided instead of or as well as the specific parts.- Returns:
- An immutable object of type
Stringthat may be null.
-
getLine
public List<String> getLine()
This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.- Returns:
- An unmodifiable list containing immutable objects of type
Stringthat may be empty.
-
getCity
public String getCity()
The name of the city, town, suburb, village or other community or delivery center.- Returns:
- An immutable object of type
Stringthat may be null.
-
getDistrict
public String getDistrict()
The name of the administrative area (county).- Returns:
- An immutable object of type
Stringthat may be null.
-
getState
public String getState()
Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (e.g. US 2 letter state codes).- Returns:
- An immutable object of type
Stringthat may be null.
-
getPostalCode
public String getPostalCode()
A postal code designating a region defined by the postal service.- Returns:
- An immutable object of type
Stringthat may be null.
-
getCountry
public String getCountry()
Country - a nation as commonly understood or generally accepted.- Returns:
- An immutable object of type
Stringthat may be null.
-
getPeriod
public Period getPeriod()
Time period when address was/is in use.- Returns:
- An immutable object of type
Periodthat may be null.
-
hasChildren
public boolean hasChildren()
- Overrides:
hasChildrenin classElement
-
accept
public void accept(String elementName, int elementIndex, Visitor visitor)
Description copied from interface:VisitableAccept a Visitor and invoke the appropriate visit methods. A typical implementation would look like this:if (visitor.preVisit(this)) { visitor.visitStart(elementName, elementIndex, this); if (visitor.visit(elementName, elementIndex, this)) { // visit children } visitor.visitEnd(elementName, elementIndex, this); visitor.postVisit(this); }- Specified by:
acceptin interfaceVisitable- Specified by:
acceptin classAbstractVisitable- Parameters:
elementName- the name of the element in the context of this visitelementIndex- the index of the element in a list or -1 if it is not contained within a Listvisitor- the visitor to use
-
toBuilder
public Address.Builder toBuilder()
Description copied from class:ElementCreate a new Builder from the contents of this Element
-
builder
public static Address.Builder builder()
-
-