Package com.ibm.fhir.model.type
Class SimpleQuantity.Builder
- java.lang.Object
-
- com.ibm.fhir.model.builder.AbstractBuilder<Element>
-
- com.ibm.fhir.model.type.Element.Builder
-
- com.ibm.fhir.model.type.Quantity.Builder
-
- com.ibm.fhir.model.type.SimpleQuantity.Builder
-
- Enclosing class:
- SimpleQuantity
public static class SimpleQuantity.Builder extends Quantity.Builder
-
-
Field Summary
-
Fields inherited from class com.ibm.fhir.model.type.Quantity.Builder
code, comparator, system, unit, value
-
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 SimpleQuantitybuild()Build theSimpleQuantitySimpleQuantity.Buildercode(Code code)A computer processable form of the unit in some unit representation system.SimpleQuantity.Buildercomparator(QuantityComparator comparator)Not allowed to be used in this contextSimpleQuantity.Builderextension(Extension... extension)May be used to represent additional information that is not part of the basic definition of the element.SimpleQuantity.Builderextension(Collection<Extension> extension)May be used to represent additional information that is not part of the basic definition of the element.protected SimpleQuantity.Builderfrom(SimpleQuantity simpleQuantity)SimpleQuantity.Builderid(String id)Unique id for the element within a resource (for internal references).SimpleQuantity.Buildersystem(Uri system)The identification of the system that provides the coded form of the unit.SimpleQuantity.Builderunit(String unit)A human-readable form of the unit.SimpleQuantity.Buildervalue(Decimal value)The value of the measured amount.-
Methods inherited from class com.ibm.fhir.model.type.Quantity.Builder
from
-
Methods inherited from class com.ibm.fhir.model.type.Element.Builder
from
-
-
-
-
Method Detail
-
id
public SimpleQuantity.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 classQuantity.Builder- Parameters:
id- Unique id for inter-element referencing- Returns:
- A reference to this Builder instance
-
extension
public SimpleQuantity.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 classQuantity.Builder- Parameters:
extension- Additional content defined by implementations- Returns:
- A reference to this Builder instance
-
extension
public SimpleQuantity.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 classQuantity.Builder- Parameters:
extension- Additional content defined by implementations- Returns:
- A reference to this Builder instance
-
value
public SimpleQuantity.Builder value(Decimal value)
The value of the measured amount. The value includes an implicit precision in the presentation of the value.- Overrides:
valuein classQuantity.Builder- Parameters:
value- Numerical value (with implicit precision)- Returns:
- A reference to this Builder instance
-
comparator
public SimpleQuantity.Builder comparator(QuantityComparator comparator)
Not allowed to be used in this contextThis element is prohibited.
- Overrides:
comparatorin classQuantity.Builder- Parameters:
comparator- < | <= | >= | > - how to understand the value- Returns:
- A reference to this Builder instance
-
unit
public SimpleQuantity.Builder unit(String unit)
A human-readable form of the unit.- Overrides:
unitin classQuantity.Builder- Parameters:
unit- Unit representation- Returns:
- A reference to this Builder instance
-
system
public SimpleQuantity.Builder system(Uri system)
The identification of the system that provides the coded form of the unit.- Overrides:
systemin classQuantity.Builder- Parameters:
system- System that defines coded unit form- Returns:
- A reference to this Builder instance
-
code
public SimpleQuantity.Builder code(Code code)
A computer processable form of the unit in some unit representation system.- Overrides:
codein classQuantity.Builder- Parameters:
code- Coded form of the unit- Returns:
- A reference to this Builder instance
-
build
public SimpleQuantity build()
Build theSimpleQuantity- Specified by:
buildin interfaceBuilder<Element>- Overrides:
buildin classQuantity.Builder- Returns:
- An immutable object of type
SimpleQuantity - Throws:
IllegalStateException- if the current state cannot be built into a valid SimpleQuantity per the base specification
-
from
protected SimpleQuantity.Builder from(SimpleQuantity simpleQuantity)
-
-