Record Class SliceRequirement.TypeDiscriminated

java.lang.Object
java.lang.Record
org.fhirfrog.frog.profilecompiler.model.SliceRequirement.TypeDiscriminated
All Implemented Interfaces:
SliceRequirement
Enclosing interface:
SliceRequirement

public static record SliceRequirement.TypeDiscriminated(String sliceElementId, String sliceName, String baseElementPath, boolean mandatory, String typeCode, List<String> targetProfiles) extends Record implements SliceRequirement
A choice-element slice identified purely by concrete datatype (algorithm.md §3.2.2), e.g. medication[x]:medicationReference identified by type == "Reference".
  • Constructor Details

    • TypeDiscriminated

      public TypeDiscriminated(String sliceElementId, String sliceName, String baseElementPath, boolean mandatory, String typeCode, List<String> targetProfiles)
      Creates an instance of a TypeDiscriminated record class.
      Parameters:
      sliceElementId - the value for the sliceElementId record component
      sliceName - the value for the sliceName record component
      baseElementPath - the value for the baseElementPath record component
      mandatory - the value for the mandatory record component
      typeCode - the value for the typeCode record component
      targetProfiles - the value for the targetProfiles record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • sliceElementId

      public String sliceElementId()
      Returns the value of the sliceElementId record component.
      Specified by:
      sliceElementId in interface SliceRequirement
      Returns:
      the value of the sliceElementId record component
    • sliceName

      public String sliceName()
      Returns the value of the sliceName record component.
      Specified by:
      sliceName in interface SliceRequirement
      Returns:
      the value of the sliceName record component
    • baseElementPath

      public String baseElementPath()
      Returns the value of the baseElementPath record component.
      Specified by:
      baseElementPath in interface SliceRequirement
      Returns:
      the value of the baseElementPath record component
    • mandatory

      public boolean mandatory()
      Returns the value of the mandatory record component.
      Specified by:
      mandatory in interface SliceRequirement
      Returns:
      the value of the mandatory record component
    • typeCode

      public String typeCode()
      Returns the value of the typeCode record component.
      Returns:
      the value of the typeCode record component
    • targetProfiles

      public List<String> targetProfiles()
      Returns the value of the targetProfiles record component.
      Returns:
      the value of the targetProfiles record component