Record Class PathSearchResult
java.lang.Object
java.lang.Record
com.darkcollective.relix.symbol.graph.internal.PathSearchResult
- Record Components:
paths- the minimal paths, all of equal size; empty when disconnected. Deterministically ordered.unreachableTerminals- terminals not connected to the rest; empty unless disconnected
public record PathSearchResult(List<JoinPath> paths, List<RelationSymbol> unreachableTerminals)
extends Record
The outcome of a
SchemaGraphSearch over a set of terminal relations, one of three shapes:
- Unique (
unique()) — exactly one minimal path spans the terminals, and no terminal was unreachable. The common case: mechanical join assembly, no model judgment (§3 step 4). - Ambiguous (
ambiguous()) — several equally minimal paths exist (parallel relationships, or a cycle). The engine cannot pick; the enumeratedpaths()— distinguished byrelationship name— are surfaced as a "did you mean?" (§3(a)). - Disconnected (
disconnected()) — the terminals do not all lie in one connected component of the (nomination-filtered) graph, so no single join spans them.paths()is empty andunreachableTerminals()names the terminals stranded from the first.
All enumerated paths() share the same minimal size (edge count);
choosing among several is a policy question left to the caller.
-
Constructor Summary
ConstructorsConstructorDescriptionPathSearchResult(List<JoinPath> paths, List<RelationSymbol> unreachableTerminals) Creates an instance of aPathSearchResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanMore than one equally minimal path — surface as "did you mean?".booleanNo single join spans the terminals — some are stranded in another component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.paths()Returns the value of thepathsrecord component.single()The single path whenunique(), else empty.final StringtoString()Returns a string representation of this record class.booleanunique()Exactly one minimal path, every terminal reachable — assemble it mechanically.Returns the value of theunreachableTerminalsrecord component.
-
Constructor Details
-
PathSearchResult
Creates an instance of aPathSearchResultrecord class.- Parameters:
paths- the value for thepathsrecord componentunreachableTerminals- the value for theunreachableTerminalsrecord component
-
-
Method Details
-
unique
public boolean unique()Exactly one minimal path, every terminal reachable — assemble it mechanically. -
ambiguous
public boolean ambiguous()More than one equally minimal path — surface as "did you mean?". -
disconnected
public boolean disconnected()No single join spans the terminals — some are stranded in another component. -
single
The single path whenunique(), else empty. -
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. -
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. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
paths
Returns the value of thepathsrecord component.- Returns:
- the value of the
pathsrecord component
-
unreachableTerminals
Returns the value of theunreachableTerminalsrecord component.- Returns:
- the value of the
unreachableTerminalsrecord component
-