Class TimeType

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>

public class TimeType extends PrimitiveType<String>
Represents a Time datatype, per the FHIR specification. A time is a specification of hours and minutes (and optionally milliseconds), with NO date and NO timezone information attached. It is expressed as a string in the form HH:mm:ss[.SSSS]
See Also:
  • Constructor Details

  • Method Details

    • 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 TimeType 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 DataType
    • getHour

      public int getHour()
    • getMinute

      public int getMinute()
    • getSecond

      public float getSecond()
    • getPrecision

      public ca.uhn.fhir.model.api.TemporalPrecisionEnum getPrecision()
    • setPrecision

      public void setPrecision(ca.uhn.fhir.model.api.TemporalPrecisionEnum temp)