Class 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.
    • Method Detail

      • getUse

        public AddressUse getUse()
        The purpose of this address.
        Returns:
        An immutable object of type AddressUse that 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 AddressType that 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 String that 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 String that 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 String that may be null.
      • getDistrict

        public String getDistrict()
        The name of the administrative area (county).
        Returns:
        An immutable object of type String that 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 String that may be null.
      • getPostalCode

        public String getPostalCode()
        A postal code designating a region defined by the postal service.
        Returns:
        An immutable object of type String that may be null.
      • getCountry

        public String getCountry()
        Country - a nation as commonly understood or generally accepted.
        Returns:
        An immutable object of type String that may be null.
      • getPeriod

        public Period getPeriod()
        Time period when address was/is in use.
        Returns:
        An immutable object of type Period that may be null.
      • accept

        public void accept​(String elementName,
                           int elementIndex,
                           Visitor visitor)
        Description copied from interface: Visitable
        Accept 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:
        accept in interface Visitable
        Specified by:
        accept in class AbstractVisitable
        Parameters:
        elementName - the name of the element in the context of this visit
        elementIndex - the index of the element in a list or -1 if it is not contained within a List
        visitor - the visitor to use
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object