Record Class ModalConstraint
java.lang.Object
java.lang.Record
tools.refinery.store.reasoning.literal.ModalConstraint
- All Implemented Interfaces:
Constraint
public record ModalConstraint(ModalitySpecification modality, ConcretenessSpecification concreteness, Constraint constraint)
extends Record
implements Constraint
-
Constructor Summary
ConstructorDescriptionModalConstraint
(ModalitySpecification modality, ConcretenessSpecification concreteness, Constraint constraint) Creates an instance of aModalConstraint
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconcreteness
record component.Returns the value of theconstraint
record component.final boolean
Indicates whether some other object is "equal to" this one.boolean
equals
(LiteralEqualityHelper helper, Constraint other) final int
hashCode()
Returns a hash code value for this object.modality()
Returns the value of themodality
record component.name()
static Constraint
of
(Modality modality, Concreteness concreteness, Constraint constraint) toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface tools.refinery.logic.Constraint
aggregateBy, aggregateBy, arity, call, call, call, callTransitive, count, count, invalidIndex, leftJoinBy, leftJoinBy
-
Constructor Details
-
ModalConstraint
public ModalConstraint(ModalitySpecification modality, ConcretenessSpecification concreteness, Constraint constraint) Creates an instance of aModalConstraint
record class.- Parameters:
modality
- the value for themodality
record componentconcreteness
- the value for theconcreteness
record componentconstraint
- the value for theconstraint
record component
-
-
Method Details
-
name
- Specified by:
name
in interfaceConstraint
-
getParameters
- Specified by:
getParameters
in interfaceConstraint
-
getReduction
- Specified by:
getReduction
in interfaceConstraint
-
equals
- Specified by:
equals
in interfaceConstraint
-
toReferenceString
- Specified by:
toReferenceString
in interfaceConstraint
-
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. -
of
-
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)
. -
modality
Returns the value of themodality
record component.- Returns:
- the value of the
modality
record component
-
concreteness
Returns the value of theconcreteness
record component.- Returns:
- the value of the
concreteness
record component
-
constraint
Returns the value of theconstraint
record component.- Returns:
- the value of the
constraint
record component
-