Package ch.so.agi.mcp.constraint
Record Class SemanticConstraint.ConstraintPath
java.lang.Object
java.lang.Record
ch.so.agi.mcp.constraint.SemanticConstraint.ConstraintPath
- Enclosing interface:
SemanticConstraint
public static record SemanticConstraint.ConstraintPath(String rootFqn, String path, boolean attributePath, @Nullable String targetViewableFqn, ConstraintExpression.Type endpointType)
extends Record
Semantic object/attribute path with the ili2c root preserved separately from surface path text.
This distinction is essential for EXISTENCE: two paths can both be spelled code but
belong to different viewables.
-
Constructor Summary
ConstructorsConstructorDescriptionConstraintPath(String rootFqn, String path, boolean attributePath, @Nullable String targetViewableFqn, ConstraintExpression.Type endpointType) Creates an instance of aConstraintPathrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theattributePathrecord component.Returns the value of theendpointTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.path()Returns the value of thepathrecord component.rootFqn()Returns the value of therootFqnrecord component.@Nullable StringReturns the value of thetargetViewableFqnrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConstraintPath
public ConstraintPath(String rootFqn, String path, boolean attributePath, @Nullable String targetViewableFqn, ConstraintExpression.Type endpointType) Creates an instance of aConstraintPathrecord class.- Parameters:
rootFqn- the value for therootFqnrecord componentpath- the value for thepathrecord componentattributePath- the value for theattributePathrecord componenttargetViewableFqn- the value for thetargetViewableFqnrecord componentendpointType- the value for theendpointTyperecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
rootFqn
Returns the value of therootFqnrecord component.- Returns:
- the value of the
rootFqnrecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
attributePath
public boolean attributePath()Returns the value of theattributePathrecord component.- Returns:
- the value of the
attributePathrecord component
-
targetViewableFqn
Returns the value of thetargetViewableFqnrecord component.- Returns:
- the value of the
targetViewableFqnrecord component
-
endpointType
Returns the value of theendpointTyperecord component.- Returns:
- the value of the
endpointTyperecord component
-