Package ch.so.agi.mcp.constraint
Record Class SemanticConstraint.Mandatory
java.lang.Object
java.lang.Record
ch.so.agi.mcp.constraint.SemanticConstraint.Mandatory
- All Implemented Interfaces:
SemanticConstraint
- Enclosing interface:
SemanticConstraint
public static record SemanticConstraint.Mandatory(String constraintName, String constraintScopedName, String contextFqn, ConstraintExpression.IliVersion version, ConstraintExpression condition)
extends Record
implements SemanticConstraint
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.so.agi.mcp.constraint.SemanticConstraint
SemanticConstraint.AllObjects, SemanticConstraint.ConstraintPath, SemanticConstraint.Existence, SemanticConstraint.Kind, SemanticConstraint.Mandatory, SemanticConstraint.NavigatedObjects, SemanticConstraint.ObjectCountSetCondition, SemanticConstraint.ObjectSetExpression, SemanticConstraint.Plausibility, SemanticConstraint.PlausibilityDirection, SemanticConstraint.Set, SemanticConstraint.SetCondition, SemanticConstraint.Unique, SemanticConstraint.UntranslatedSetCondition, SemanticConstraint.ValueSetCondition -
Constructor Summary
ConstructorsConstructorDescriptionMandatory(String constraintName, String constraintScopedName, String contextFqn, ConstraintExpression.IliVersion version, ConstraintExpression condition) Creates an instance of aMandatoryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconditionrecord component.Returns the value of theconstraintNamerecord component.Returns the value of theconstraintScopedNamerecord component.Returns the value of thecontextFqnrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Constructor Details
-
Mandatory
public Mandatory(String constraintName, String constraintScopedName, String contextFqn, ConstraintExpression.IliVersion version, ConstraintExpression condition) Creates an instance of aMandatoryrecord class.- Parameters:
constraintName- the value for theconstraintNamerecord componentconstraintScopedName- the value for theconstraintScopedNamerecord componentcontextFqn- the value for thecontextFqnrecord componentversion- the value for theversionrecord componentcondition- the value for theconditionrecord component
-
-
Method Details
-
kind
- Specified by:
kindin interfaceSemanticConstraint
-
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). -
constraintName
Returns the value of theconstraintNamerecord component.- Specified by:
constraintNamein interfaceSemanticConstraint- Returns:
- the value of the
constraintNamerecord component
-
constraintScopedName
Returns the value of theconstraintScopedNamerecord component.- Specified by:
constraintScopedNamein interfaceSemanticConstraint- Returns:
- the value of the
constraintScopedNamerecord component
-
contextFqn
Returns the value of thecontextFqnrecord component.- Specified by:
contextFqnin interfaceSemanticConstraint- Returns:
- the value of the
contextFqnrecord component
-
version
Returns the value of theversionrecord component.- Specified by:
versionin interfaceSemanticConstraint- Returns:
- the value of the
versionrecord component
-
condition
Returns the value of theconditionrecord component.- Returns:
- the value of the
conditionrecord component
-