Record Class SliceRequirement.ValueDiscriminated

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

public static record SliceRequirement.ValueDiscriminated(String sliceElementId, String sliceName, String baseElementPath, boolean mandatory, List<SliceRequirement.ValueDiscriminated.ValueMatch> matches) extends Record implements SliceRequirement
A slice identified by several independent fixed sub-paths that must all match together on the same candidate element (algorithm.md §3.2.3) - a conjunction over matches.
  • Constructor Details

    • ValueDiscriminated

      public ValueDiscriminated(String sliceElementId, String sliceName, String baseElementPath, boolean mandatory, List<SliceRequirement.ValueDiscriminated.ValueMatch> matches)
      Creates an instance of a ValueDiscriminated 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
      matches - the value for the matches 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
    • matches

      Returns the value of the matches record component.
      Returns:
      the value of the matches record component