Record Class ConstrainedMultiplicity
java.lang.Object
java.lang.Record
tools.refinery.store.reasoning.translator.multiplicity.ConstrainedMultiplicity
- All Implemented Interfaces:
Multiplicity
public record ConstrainedMultiplicity(NonEmptyCardinalityInterval multiplicity, PartialRelation errorSymbol)
extends Record
implements Multiplicity
-
Constructor Summary
ConstructorDescriptionConstrainedMultiplicity
(NonEmptyCardinalityInterval multiplicity, PartialRelation errorSymbol) Creates an instance of aConstrainedMultiplicity
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of theerrorSymbol
record component.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of themultiplicity
record component.static ConstrainedMultiplicity
of
(CardinalityInterval multiplicity, PartialRelation errorSymbol) final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ConstrainedMultiplicity
public ConstrainedMultiplicity(NonEmptyCardinalityInterval multiplicity, PartialRelation errorSymbol) Creates an instance of aConstrainedMultiplicity
record class.- Parameters:
multiplicity
- the value for themultiplicity
record componenterrorSymbol
- the value for theerrorSymbol
record component
-
-
Method Details
-
of
public static ConstrainedMultiplicity of(CardinalityInterval multiplicity, PartialRelation errorSymbol) -
isConstrained
public boolean isConstrained()- Specified by:
isConstrained
in interfaceMultiplicity
-
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)
. -
multiplicity
Returns the value of themultiplicity
record component.- Specified by:
multiplicity
in interfaceMultiplicity
- Returns:
- the value of the
multiplicity
record component
-
errorSymbol
Returns the value of theerrorSymbol
record component.- Returns:
- the value of the
errorSymbol
record component
-