Class StringType

All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement, Externalizable, Serializable, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseDatatype, org.hl7.fhir.instance.model.api.IBaseElement, org.hl7.fhir.instance.model.api.IBaseHasExtensions, org.hl7.fhir.instance.model.api.IPrimitiveType<String>
Direct Known Subclasses:
CodeType, MarkdownType

public class StringType extends PrimitiveType<String>
Primitive type "string" in FHIR - any sequence of unicode characters less than 1MB in length
See Also:
  • Constructor Details

  • Method Details

    • getValueNotNull

      Returns the value of this StringType, or an empty string ("") if the value is null. This method is provided as a convenience to users of this API.
    • toString

      public String toString()
      Returns the value of this string, or null if no value is present
      Overrides:
      toString in class PrimitiveType<String>
    • parse

      protected String parse(String theValue)
      Description copied from class: PrimitiveType
      Subclasses must override to convert an encoded representation of this datatype into a "coerced" one
      Specified by:
      parse in class PrimitiveType<String>
      Parameters:
      theValue - Will not be null
      Returns:
      May return null if the value does not correspond to anything
    • encode

      protected String encode(String theValue)
      Description copied from class: PrimitiveType
      Subclasses must override to convert a "coerced" value into an encoded one.
      Specified by:
      encode in class PrimitiveType<String>
      Parameters:
      theValue - Will not be null
      Returns:
      May return null if the value does not correspond to anything
    • copy

      public StringType copy()
      Specified by:
      copy in class PrimitiveType<String>
    • fhirType

      public String fhirType()
      Specified by:
      fhirType in interface org.hl7.fhir.instance.model.api.IBase
      Overrides:
      fhirType in class Element