Class Element

    • Method Detail

      • getId

        public String getId()
        Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
        Returns:
        An immutable object of type String that may be null.
      • getExtension

        public List<Extension> getExtension()
        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.
        Returns:
        An unmodifiable list containing immutable objects of type Extension that may be empty.
      • is

        public <T extends Element> boolean is​(Class<T> elementType)
        Returns:
        true if the element can be cast to the requested elementType
      • as

        public <T extends Element> T as​(Class<T> elementType)
        Throws:
        ClassCastException - when this element cannot be cast to the requested elementType
      • hasValue

        public boolean hasValue()
        Returns:
        true if the element is a FHIR primitive type and has a primitive value (as opposed to not having a value and just having extensions), otherwise false
      • hasChildren

        public boolean hasChildren()
      • toBuilder

        public abstract Element.Builder toBuilder()
        Create a new Builder from the contents of this Element