Record Class HealingCandidate

java.lang.Object
java.lang.Record
com.shaft.heal.model.HealingCandidate
Record Components:
candidateId - stable attempt-local candidate identifier
proposedLocator - proposed replacement locator
fingerprint - candidate fingerprint
score - separate ranking scores
evidence - matched evidence descriptions
unique - whether the proposed locator is unique
visible - whether the element is displayed
interactable - whether the element is displayed and enabled
contextMatched - whether frame and shadow context matched

public record HealingCandidate(String candidateId, String proposedLocator, LocatorFingerprint fingerprint, HealingScore score, List<String> evidence, boolean unique, boolean visible, boolean interactable, boolean contextMatched) extends Record
Explainable candidate derived from deterministic page evidence.
  • Constructor Details

    • HealingCandidate

      public HealingCandidate(String candidateId, String proposedLocator, LocatorFingerprint fingerprint, HealingScore score, List<String> evidence, boolean unique, boolean visible, boolean interactable, boolean contextMatched)
      Creates an immutable candidate.
  • 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 the compare method from their corresponding wrapper classes.
      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.
    • candidateId

      public String candidateId()
      Returns the value of the candidateId record component.
      Returns:
      the value of the candidateId record component
    • proposedLocator

      public String proposedLocator()
      Returns the value of the proposedLocator record component.
      Returns:
      the value of the proposedLocator record component
    • fingerprint

      public LocatorFingerprint fingerprint()
      Returns the value of the fingerprint record component.
      Returns:
      the value of the fingerprint record component
    • score

      public HealingScore score()
      Returns the value of the score record component.
      Returns:
      the value of the score record component
    • evidence

      public List<String> evidence()
      Returns the value of the evidence record component.
      Returns:
      the value of the evidence record component
    • unique

      public boolean unique()
      Returns the value of the unique record component.
      Returns:
      the value of the unique record component
    • visible

      public boolean visible()
      Returns the value of the visible record component.
      Returns:
      the value of the visible record component
    • interactable

      public boolean interactable()
      Returns the value of the interactable record component.
      Returns:
      the value of the interactable record component
    • contextMatched

      public boolean contextMatched()
      Returns the value of the contextMatched record component.
      Returns:
      the value of the contextMatched record component