Record Class PlainMustSupportElement

java.lang.Object
java.lang.Record
org.fhirfrog.frog.profilecompiler.model.PlainMustSupportElement
Record Components:
typeCode - the element's first declared type code (used to fold the boolean-specific exists() or ... = false presence rule into the emitted expression, algorithm.md §7.1)
targetProfiles - non-null, possibly-empty; populated only when the element's type includes Reference (algorithm.md §3.4 rule 1 / §3.5)

public record PlainMustSupportElement(String elementId, String path, String typeCode, boolean mandatory, FixedValueConstraint fixedValue, List<String> targetProfiles) extends Record
A "plain" must-support element (algorithm.md §3.4) - whatever's left after extensions, slices, and choice-type must-support elements (§3.3) are removed. path is the resource-type- prefix-stripped element path as it will be checked; it may already have been rewritten by fixed-value detection (fixedValue, whose own pathSuffix is appended to the *pre-rewrite* element path to get here) or by choice-ancestor rewriting (algorithm.md §3.4 rule 3).
  • Constructor Details

    • PlainMustSupportElement

      public PlainMustSupportElement(String elementId, String path, String typeCode, boolean mandatory, FixedValueConstraint fixedValue, List<String> targetProfiles)
      Creates an instance of a PlainMustSupportElement record class.
      Parameters:
      elementId - the value for the elementId record component
      path - the value for the path record component
      typeCode - the value for the typeCode record component
      mandatory - the value for the mandatory record component
      fixedValue - the value for the fixedValue 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.
    • elementId

      public String elementId()
      Returns the value of the elementId record component.
      Returns:
      the value of the elementId record component
    • path

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

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

      public boolean mandatory()
      Returns the value of the mandatory record component.
      Returns:
      the value of the mandatory record component
    • fixedValue

      public FixedValueConstraint fixedValue()
      Returns the value of the fixedValue record component.
      Returns:
      the value of the fixedValue record component
    • targetProfiles

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