Record Class LocatorCandidate
java.lang.Object
java.lang.Record
com.shaft.capture.model.LocatorCandidate
- Record Components:
strategy- locator strategyexpression- sanitized locator expressionuniquenessCount- number of matching elements observedvisible- whether the target was visiblestable- whether the evidence appeared stablesignals- additional deterministic scoring signals
public record LocatorCandidate(LocatorCandidate.LocatorStrategy strategy, String expression, int uniquenessCount, boolean visible, boolean stable, Set<LocatorCandidate.LocatorSignal> signals)
extends Record
Locator evidence retained for deterministic ranking and review.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDeterministic evidence signals.static enumSupported locator evidence strategies. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator<LocatorCandidate> Stable best-first ordering for candidate review and replay. -
Constructor Summary
ConstructorsConstructorDescriptionLocatorCandidate(LocatorCandidate.LocatorStrategy strategy, String expression, int uniquenessCount, boolean visible, boolean stable, Set<LocatorCandidate.LocatorSignal> signals) Creates immutable locator evidence. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpressionrecord component.final inthashCode()Returns a hash code value for this object.intscore()Computes a deterministic score without model inference.signals()Returns the value of thesignalsrecord component.booleanstable()Returns the value of thestablerecord component.strategy()Returns the value of thestrategyrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theuniquenessCountrecord component.booleanvisible()Returns the value of thevisiblerecord component.
-
Field Details
-
BEST_FIRST
Stable best-first ordering for candidate review and replay.
-
-
Constructor Details
-
LocatorCandidate
public LocatorCandidate(LocatorCandidate.LocatorStrategy strategy, String expression, int uniquenessCount, boolean visible, boolean stable, Set<LocatorCandidate.LocatorSignal> signals) Creates immutable locator evidence.
-
-
Method Details
-
score
public int score()Computes a deterministic score without model inference.- Returns:
- candidate score
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
strategy
-
expression
Returns the value of theexpressionrecord component.- Returns:
- the value of the
expressionrecord component
-
uniquenessCount
public int uniquenessCount()Returns the value of theuniquenessCountrecord component.- Returns:
- the value of the
uniquenessCountrecord component
-
visible
-
stable
-
signals
-