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
ConstructorsConstructorDescriptionConstrainedMultiplicity(NonEmptyCardinalityInterval multiplicity, PartialRelation errorSymbol) Creates an instance of aConstrainedMultiplicityrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrorSymbolrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of themultiplicityrecord component.static ConstrainedMultiplicityof(CardinalityInterval multiplicity, PartialRelation errorSymbol) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConstrainedMultiplicity
public ConstrainedMultiplicity(NonEmptyCardinalityInterval multiplicity, PartialRelation errorSymbol) Creates an instance of aConstrainedMultiplicityrecord class.- Parameters:
multiplicity- the value for themultiplicityrecord componenterrorSymbol- the value for theerrorSymbolrecord component
-
-
Method Details
-
of
public static ConstrainedMultiplicity of(CardinalityInterval multiplicity, PartialRelation errorSymbol) -
isConstrained
public boolean isConstrained()- Specified by:
isConstrainedin 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 themultiplicityrecord component.- Specified by:
multiplicityin interfaceMultiplicity- Returns:
- the value of the
multiplicityrecord component
-
errorSymbol
Returns the value of theerrorSymbolrecord component.- Returns:
- the value of the
errorSymbolrecord component
-