Interface MultiplicityElement

    • Method Detail

      • isOrdered

        boolean isOrdered()
        Returns the value of the 'Is Ordered' attribute. The default value is "false". For a multivalued multiplicity, this attribute specifies whether the values in an instantiation of this element are sequentially ordered.
        Returns:
        the value of the 'Is Ordered' attribute.
        See Also:
        setIsOrdered(boolean), UMLPackage.getMultiplicityElement_IsOrdered()
      • setIsOrdered

        void setIsOrdered​(boolean value)
        Sets the value of the 'Is Ordered' attribute.
        Parameters:
        value - the new value of the 'Is Ordered' attribute.
        See Also:
        isOrdered()
      • isUnique

        boolean isUnique()
        Returns the value of the 'Is Unique' attribute. The default value is "true". For a multivalued multiplicity, this attributes specifies whether the values in an instantiation of this element are unique.
        Returns:
        the value of the 'Is Unique' attribute.
        See Also:
        setIsUnique(boolean), UMLPackage.getMultiplicityElement_IsUnique()
      • setIsUnique

        void setIsUnique​(boolean value)
        Sets the value of the 'Is Unique' attribute.
        Parameters:
        value - the new value of the 'Is Unique' attribute.
        See Also:
        isUnique()
      • setUpper

        void setUpper​(int value)
        Sets the value of the 'Upper' attribute.
        Parameters:
        value - the new value of the 'Upper' attribute.
        See Also:
        getUpper()
      • setLower

        void setLower​(int value)
        Sets the value of the 'Lower' attribute.
        Parameters:
        value - the new value of the 'Lower' attribute.
        See Also:
        getLower()
      • setUpperValue

        void setUpperValue​(ValueSpecification value)
        Sets the value of the 'Upper Value' containment reference.
        Parameters:
        value - the new value of the 'Upper Value' containment reference.
        See Also:
        getUpperValue()
      • setLowerValue

        void setLowerValue​(ValueSpecification value)
        Sets the value of the 'Lower Value' containment reference.
        Parameters:
        value - the new value of the 'Lower Value' containment reference.
        See Also:
        getLowerValue()
      • validateUpperGt0

        boolean validateUpperGt0​(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                 Map context)
        A multiplicity must define at least one valid cardinality that is greater than zero. upperBound()->notEmpty() implies upperBound() > 0
      • validateLowerGe0

        boolean validateLowerGe0​(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                 Map context)
        The lower bound must be a non-negative integer literal. lowerBound()->notEmpty() implies lowerBound() >= 0
      • validateUpperGeLower

        boolean validateUpperGeLower​(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                     Map context)
        The upper bound must be greater than or equal to the lower bound. (upperBound()->notEmpty() and lowerBound()->notEmpty()) implies upperBound() >= lowerBound()
      • validateValueSpecificationNoSideEffects

        boolean validateValueSpecificationNoSideEffects​(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                        Map context)
        If a non-literal ValueSpecification is used for the lower or upper bound, then evaluating that specification must not have side effects. true
      • validateValueSpecificationConstant

        boolean validateValueSpecificationConstant​(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                   Map context)
        If a non-literal ValueSpecification is used for the lower or upper bound, then that specification must be a constant expression. true
      • isMultivalued

        boolean isMultivalued()
        The query isMultivalued() checks whether this multiplicity has an upper bound greater than one. upperBound()->notEmpty() result = upperBound() > 1
      • includesCardinality

        boolean includesCardinality​(int C)
        The query includesCardinality() checks whether the specified cardinality is valid for this multiplicity. upperBound()->notEmpty() and lowerBound()->notEmpty() result = (lowerBound() <= C) and (upperBound() >= C)
      • includesMultiplicity

        boolean includesMultiplicity​(MultiplicityElement M)
        The query includesMultiplicity() checks whether this multiplicity includes all the cardinalities allowed by the specified multiplicity. self.upperBound()->notEmpty() and self.lowerBound()->notEmpty() and M.upperBound()->notEmpty() and M.lowerBound()->notEmpty() result = (self.lowerBound() <= M.lowerBound()) and (self.upperBound() >= M.upperBound())
      • lowerBound

        int lowerBound()
        The query lowerBound() returns the lower bound of the multiplicity as an integer. result = if lowerValue->isEmpty() then 1 else lowerValue.integerValue() endif
      • upperBound

        int upperBound()
        The query upperBound() returns the upper bound of the multiplicity for a bounded multiplicity as an unlimited natural. result = if upperValue->isEmpty() then 1 else upperValue.unlimitedValue() endif
      • compatibleWith

        boolean compatibleWith​(MultiplicityElement other)
        The operation compatibleWith takes another multiplicity as input. It checks if one multiplicity is compatible with another. result = Integer.allInstances()->forAll(i : Integer | self.includesCardinality(i) implies other.includesCardinality(i))
      • is

        boolean is​(int lowerbound,
                   int upperbound)
        The operation is determines if the upper and lower bound of the ranges are the ones given. result = (lowerbound = self.lowerbound and upperbound = self.upperbound)