Package ch.so.agi.mcp.constraint
Record Class SemanticConstraint.Set
java.lang.Object
java.lang.Record
ch.so.agi.mcp.constraint.SemanticConstraint.Set
- All Implemented Interfaces:
SemanticConstraint
- Enclosing interface:
SemanticConstraint
public static record SemanticConstraint.Set(String constraintName, String constraintScopedName, String contextFqn, ConstraintExpression.IliVersion version, boolean perBasket, @Nullable ConstraintExpression preCondition, SemanticConstraint.SetCondition 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
ConstructorsConstructorDescriptionSet(String constraintName, String constraintScopedName, String contextFqn, ConstraintExpression.IliVersion version, boolean perBasket, @Nullable ConstraintExpression preCondition, SemanticConstraint.SetCondition condition) Creates an instance of aSetrecord 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()booleanReturns the value of theperBasketrecord component.@Nullable ConstraintExpressionReturns the value of thepreConditionrecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Constructor Details
-
Set
public Set(String constraintName, String constraintScopedName, String contextFqn, ConstraintExpression.IliVersion version, boolean perBasket, @Nullable ConstraintExpression preCondition, SemanticConstraint.SetCondition condition) Creates an instance of aSetrecord class.- Parameters:
constraintName- the value for theconstraintNamerecord componentconstraintScopedName- the value for theconstraintScopedNamerecord componentcontextFqn- the value for thecontextFqnrecord componentversion- the value for theversionrecord componentperBasket- the value for theperBasketrecord componentpreCondition- the value for thepreConditionrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
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
-
perBasket
public boolean perBasket()Returns the value of theperBasketrecord component.- Returns:
- the value of the
perBasketrecord component
-
preCondition
Returns the value of thepreConditionrecord component.- Returns:
- the value of the
preConditionrecord component
-
condition
Returns the value of theconditionrecord component.- Returns:
- the value of the
conditionrecord component
-