org.eclipse.ocl.examples.pivot
Interface MultiplicityElement

All Superinterfaces:
Element, org.eclipse.emf.ecore.EObject, MonikeredElement, org.eclipse.emf.common.notify.Notifier, PivotObject, Visitable
All Known Subinterfaces:
Feature, Iteration, Operation, Parameter, Property, TypedMultiplicityElement
All Known Implementing Classes:
FeatureImpl, IterationImpl, MultiplicityElementImpl, OperationImpl, ParameterImpl, PropertyImpl, TypedMultiplicityElementImpl

public interface MultiplicityElement
extends MonikeredElement

A representation of the model object 'Multiplicity Element'. A multiplicity is a definition of an inclusive interval of non-negative integers beginning with a lower bound and ending with a (possibly infinite) upper bound. A multiplicity element embeds this information to specify the allowable cardinalities for an instantiation of this element.

The following features are supported:

See Also:
PivotPackage.getMultiplicityElement()
Generated
Model
abstract="true"

Method Summary
 java.math.BigInteger getLower()
          Returns the value of the 'Lower' attribute.
 java.math.BigInteger getUpper()
          Returns the value of the 'Upper' attribute.
 boolean includesCardinality(java.math.BigInteger C)
          The query includesCardinality() checks whether the specified cardinality is valid for this multiplicity.
 boolean includesMultiplicity(MultiplicityElement M)
          The query includesMultiplicity() checks whether this multiplicity includes all the cardinalities allowed by the specified multiplicity.
 boolean isMultivalued()
          The query isMultivalued() checks whether this multiplicity has an upper bound greater than one.
 boolean isOrdered()
          Returns the value of the 'Is Ordered' attribute.
 boolean isUnique()
          Returns the value of the 'Is Unique' attribute.
 java.math.BigInteger lowerBound()
          The query lowerBound() returns the lower bound of the multiplicity as an integer.
 void setIsOrdered(boolean value)
          Sets the value of the 'Is Ordered' attribute.
 void setIsUnique(boolean value)
          Sets the value of the 'Is Unique' attribute.
 void setLower(java.math.BigInteger value)
          Sets the value of the 'Lower' attribute.
 void setUpper(java.math.BigInteger value)
          Sets the value of the 'Upper' attribute.
 java.math.BigInteger upperBound()
          The query upperBound() returns the upper bound of the multiplicity for a bounded multiplicity as an unlimited natural.
 boolean validateLowerGe0(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The lower bound must be a non-negative integer literal.
 boolean validateUpperGeLower(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The upper bound must be greater than or equal to the lower bound.
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.MonikeredElement
getMoniker, hasMoniker, setMoniker
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.Element
createOwnedComment, getETarget, getOwnedComments
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.util.Visitable
accept, eClass
 

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), PivotPackage.getMultiplicityElement_IsOrdered()
Generated
Model
default="false" dataType="org.eclipse.ocl.examples.pivot.Boolean" required="true" ordered="false"

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()
Generated

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), PivotPackage.getMultiplicityElement_IsUnique()
Generated
Model
default="true" dataType="org.eclipse.ocl.examples.pivot.Boolean" required="true" ordered="false"

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()
Generated

getLower

java.math.BigInteger getLower()
Returns the value of the 'Lower' attribute. The default value is "1". Specifies the lower bound of the multiplicity interval.

Returns:
the value of the 'Lower' attribute.
See Also:
setLower(BigInteger), PivotPackage.getMultiplicityElement_Lower()
Generated
Model
default="1" dataType="org.eclipse.ocl.examples.pivot.Integer" ordered="false"

setLower

void setLower(java.math.BigInteger value)
Sets the value of the 'Lower' attribute.

Parameters:
value - the new value of the 'Lower' attribute.
See Also:
getLower()
Generated

getUpper

java.math.BigInteger getUpper()
Returns the value of the 'Upper' attribute. The default value is "1". Specifies the upper bound of the multiplicity interval.

Returns:
the value of the 'Upper' attribute.
See Also:
setUpper(BigInteger), PivotPackage.getMultiplicityElement_Upper()
Generated
Model
default="1" dataType="org.eclipse.ocl.examples.pivot.UnlimitedNatural" ordered="false"

setUpper

void setUpper(java.math.BigInteger value)
Sets the value of the 'Upper' attribute.

Parameters:
value - the new value of the 'Upper' attribute.
See Also:
getUpper()
Generated

validateLowerGe0

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

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.
Generated
Model

validateUpperGeLower

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

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.
Generated
Model

lowerBound

java.math.BigInteger lowerBound()
The query lowerBound() returns the lower bound of the multiplicity as an integer. result = if lower->notEmpty() then lower else 1 endif

Generated
Model
dataType="org.eclipse.ocl.examples.pivot.Integer" required="true" ordered="false"

upperBound

java.math.BigInteger upperBound()
The query upperBound() returns the upper bound of the multiplicity for a bounded multiplicity as an unlimited natural. result = if upper->notEmpty() then upper else 1 endif

Generated
Model
dataType="org.eclipse.ocl.examples.pivot.UnlimitedNatural" required="true" ordered="false"

isMultivalued

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

Generated
Model
kind="operation" dataType="org.eclipse.ocl.examples.pivot.Boolean" required="true" ordered="false"

includesCardinality

boolean includesCardinality(java.math.BigInteger 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)

Generated
Model
dataType="org.eclipse.ocl.examples.pivot.Boolean" required="true" ordered="false" CDataType="org.eclipse.ocl.examples.pivot.Integer" CRequired="true" COrdered="false"

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())

Generated
Model
dataType="org.eclipse.ocl.examples.pivot.Boolean" required="true" ordered="false" MRequired="true" MOrdered="false"