Class Address.Builder

    • Method Detail

      • id

        public Address.Builder id​(String id)
        Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
        Overrides:
        id in class Element.Builder
        Parameters:
        id - Unique id for inter-element referencing
        Returns:
        A reference to this Builder instance
      • extension

        public Address.Builder extension​(Extension... extension)
        May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

        Adds new element(s) to the existing list

        Overrides:
        extension in class Element.Builder
        Parameters:
        extension - Additional content defined by implementations
        Returns:
        A reference to this Builder instance
      • extension

        public Address.Builder extension​(Collection<Extension> extension)
        May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

        Replaces the existing list with a new one containing elements from the Collection

        Overrides:
        extension in class Element.Builder
        Parameters:
        extension - Additional content defined by implementations
        Returns:
        A reference to this Builder instance
      • use

        public Address.Builder use​(AddressUse use)
        The purpose of this address.
        Parameters:
        use - home | work | temp | old | billing - purpose of this address
        Returns:
        A reference to this Builder instance
      • type

        public Address.Builder type​(AddressType type)
        Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.
        Parameters:
        type - postal | physical | both
        Returns:
        A reference to this Builder instance
      • text

        public Address.Builder text​(String text)
        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.
        Parameters:
        text - Text representation of the address
        Returns:
        A reference to this Builder instance
      • line

        public Address.Builder line​(String... line)
        This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.

        Adds new element(s) to the existing list

        Parameters:
        line - Street name, number, direction & P.O. Box etc.
        Returns:
        A reference to this Builder instance
      • line

        public Address.Builder line​(Collection<String> line)
        This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.

        Replaces the existing list with a new one containing elements from the Collection

        Parameters:
        line - Street name, number, direction & P.O. Box etc.
        Returns:
        A reference to this Builder instance
      • city

        public Address.Builder city​(String city)
        The name of the city, town, suburb, village or other community or delivery center.
        Parameters:
        city - Name of city, town etc.
        Returns:
        A reference to this Builder instance
      • district

        public Address.Builder district​(String district)
        The name of the administrative area (county).
        Parameters:
        district - District name (aka county)
        Returns:
        A reference to this Builder instance
      • state

        public Address.Builder state​(String state)
        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).
        Parameters:
        state - Sub-unit of country (abbreviations ok)
        Returns:
        A reference to this Builder instance
      • postalCode

        public Address.Builder postalCode​(String postalCode)
        A postal code designating a region defined by the postal service.
        Parameters:
        postalCode - Postal code for area
        Returns:
        A reference to this Builder instance
      • country

        public Address.Builder country​(String country)
        Country - a nation as commonly understood or generally accepted.
        Parameters:
        country - Country (e.g. can be ISO 3166 2 or 3 letter code)
        Returns:
        A reference to this Builder instance
      • period

        public Address.Builder period​(Period period)
        Time period when address was/is in use.
        Parameters:
        period - Time period when address was/is in use
        Returns:
        A reference to this Builder instance