Class PrimitiveType<T>

All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement, 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<T>
Direct Known Subclasses:
Base64BinaryType, BaseDateTimeType, BooleanType, DecimalType, Enumeration, IntegerType, StringType, TimeType, UriType

public abstract class PrimitiveType<T> extends Type implements org.hl7.fhir.instance.model.api.IPrimitiveType<T>, org.hl7.fhir.instance.model.api.IBaseHasExtensions
See Also:
  • Constructor Details

  • Method Details

    • getValue

      public T getValue()
      Specified by:
      getValue in interface org.hl7.fhir.instance.model.api.IPrimitiveType<T>
    • asStringValue

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • setValue

      public PrimitiveType<T> setValue(T theValue)
      Specified by:
      setValue in interface org.hl7.fhir.instance.model.api.IPrimitiveType<T>
    • updateStringValue

      protected void updateStringValue()
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface org.hl7.fhir.instance.model.api.IBase
      Overrides:
      isEmpty in class Element
    • fromStringValue

      public void fromStringValue(String theValue)
    • parse

      protected abstract T parse(String theValue)
      Subclasses must override to convert an encoded representation of this datatype into a "coerced" one
      Parameters:
      theValue - Will not be null
      Returns:
      May return null if the value does not correspond to anything
    • encode

      protected abstract String encode(T theValue)
      Subclasses must override to convert a "coerced" value into an encoded one.
      Parameters:
      theValue - Will not be null
      Returns:
      May return null if the value does not correspond to anything
    • isPrimitive

      public boolean isPrimitive()
      Overrides:
      isPrimitive in class Base
    • primitiveValue

      Overrides:
      primitiveValue in class Base
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hasValue

      public boolean hasValue()
      Specified by:
      hasValue in interface org.hl7.fhir.instance.model.api.IPrimitiveType<T>
    • getValueAsString

      Specified by:
      getValueAsString in interface org.hl7.fhir.instance.model.api.IPrimitiveType<T>
    • setValueAsString

      public void setValueAsString(String theValue)
      Specified by:
      setValueAsString in interface org.hl7.fhir.instance.model.api.IPrimitiveType<T>
    • typedCopy

      protected Type typedCopy()
      Specified by:
      typedCopy in class Type
    • copy

      public abstract Type copy()
      Overrides:
      copy in class Type
    • equalsDeep

      public boolean equalsDeep(Base obj)
      Overrides:
      equalsDeep in class Element
    • equalsShallow

      public boolean equalsShallow(Base obj)
      Overrides:
      equalsShallow in class Element