Package com.ibm.fhir.model.type
Class HumanName.Builder
- java.lang.Object
-
- com.ibm.fhir.model.builder.AbstractBuilder<Element>
-
- com.ibm.fhir.model.type.Element.Builder
-
- com.ibm.fhir.model.type.HumanName.Builder
-
- Enclosing class:
- HumanName
public static class HumanName.Builder extends Element.Builder
-
-
Field Summary
-
Fields inherited from class com.ibm.fhir.model.type.Element.Builder
extension, id
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HumanNamebuild()Build theHumanNameHumanName.Builderextension(Extension... extension)May be used to represent additional information that is not part of the basic definition of the element.HumanName.Builderextension(Collection<Extension> extension)May be used to represent additional information that is not part of the basic definition of the element.HumanName.Builderfamily(String family)The part of a name that links to the genealogy.protected HumanName.Builderfrom(HumanName humanName)HumanName.Buildergiven(String... given)Given name.HumanName.Buildergiven(Collection<String> given)Given name.HumanName.Builderid(String id)Unique id for the element within a resource (for internal references).HumanName.Builderperiod(Period period)Indicates the period of time when this name was valid for the named person.HumanName.Builderprefix(String... prefix)Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc.HumanName.Builderprefix(Collection<String> prefix)Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc.HumanName.Buildersuffix(String... suffix)Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc.HumanName.Buildersuffix(Collection<String> suffix)Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc.HumanName.Buildertext(String text)Specifies the entire name as it should be displayed e.g.HumanName.Builderuse(NameUse use)Identifies the purpose for this name.-
Methods inherited from class com.ibm.fhir.model.type.Element.Builder
from
-
-
-
-
Method Detail
-
id
public HumanName.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:
idin classElement.Builder- Parameters:
id- Unique id for inter-element referencing- Returns:
- A reference to this Builder instance
-
extension
public HumanName.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:
extensionin classElement.Builder- Parameters:
extension- Additional content defined by implementations- Returns:
- A reference to this Builder instance
-
extension
public HumanName.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:
extensionin classElement.Builder- Parameters:
extension- Additional content defined by implementations- Returns:
- A reference to this Builder instance
-
use
public HumanName.Builder use(NameUse use)
Identifies the purpose for this name.- Parameters:
use- usual | official | temp | nickname | anonymous | old | maiden- Returns:
- A reference to this Builder instance
-
text
public HumanName.Builder text(String text)
Specifies the entire name as it should be displayed e.g. on an application UI. This may be provided instead of or as well as the specific parts.- Parameters:
text- Text representation of the full name- Returns:
- A reference to this Builder instance
-
family
public HumanName.Builder family(String family)
The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.- Parameters:
family- Family name (often called 'Surname')- Returns:
- A reference to this Builder instance
-
given
public HumanName.Builder given(String... given)
Given name.Adds new element(s) to the existing list
- Parameters:
given- Given names (not always 'first'). Includes middle names- Returns:
- A reference to this Builder instance
-
given
public HumanName.Builder given(Collection<String> given)
Given name.Replaces the existing list with a new one containing elements from the Collection
- Parameters:
given- Given names (not always 'first'). Includes middle names- Returns:
- A reference to this Builder instance
-
prefix
public HumanName.Builder prefix(String... prefix)
Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.Adds new element(s) to the existing list
- Parameters:
prefix- Parts that come before the name- Returns:
- A reference to this Builder instance
-
prefix
public HumanName.Builder prefix(Collection<String> prefix)
Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.Replaces the existing list with a new one containing elements from the Collection
- Parameters:
prefix- Parts that come before the name- Returns:
- A reference to this Builder instance
-
suffix
public HumanName.Builder suffix(String... suffix)
Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.Adds new element(s) to the existing list
- Parameters:
suffix- Parts that come after the name- Returns:
- A reference to this Builder instance
-
suffix
public HumanName.Builder suffix(Collection<String> suffix)
Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.Replaces the existing list with a new one containing elements from the Collection
- Parameters:
suffix- Parts that come after the name- Returns:
- A reference to this Builder instance
-
period
public HumanName.Builder period(Period period)
Indicates the period of time when this name was valid for the named person.- Parameters:
period- Time period when name was/is in use- Returns:
- A reference to this Builder instance
-
build
public HumanName build()
Build theHumanName- Specified by:
buildin interfaceBuilder<Element>- Specified by:
buildin classElement.Builder- Returns:
- An immutable object of type
HumanName - Throws:
IllegalStateException- if the current state cannot be built into a valid HumanName per the base specification
-
from
protected HumanName.Builder from(HumanName humanName)
-
-