|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A representation of the model object 'Multiplicity Element'. A MultiplicityElement is an abstract metaclass which includes optional attributes for defining the bounds of a multiplicity. A MultiplicityElement also includes specifications of whether the values in an instantiation of this element must be unique or ordered.
The following features are supported:
UML2Package.getMultiplicityElement()
Field Summary | |
static String |
copyright
|
static int |
UNLIMITED_UPPER_BOUND
|
Method Summary | |
ValueSpecification |
createLowerValue(EClass eClass)
Creates a ValueSpecification and sets the 'Lower Value' containment reference |
ValueSpecification |
createUpperValue(EClass eClass)
Creates a ValueSpecification and sets the 'Upper Value' containment reference |
int |
getLower()
Returns the value of the 'Lower' attribute. |
ValueSpecification |
getLowerValue()
Returns the value of the 'Lower Value' containment reference |
EList |
getOwnedElements()
|
int |
getUpper()
Returns the value of the 'Upper' attribute. |
ValueSpecification |
getUpperValue()
Returns the value of the 'Upper Value' containment reference |
boolean |
includesCardinality(int C)
A query based on the following OCL expression:
(lowerBound() <= C) and (upperBound() >= C)
|
boolean |
includesMultiplicity(MultiplicityElement M)
A query based on the following OCL expression:
(self.lowerBound() <= M.lowerBound()) and (self.upperBound() >= M.upperBound())
|
boolean |
isMultivalued()
A query based on the following OCL expression:
upperBound() > 1
|
boolean |
isOrdered()
Returns the value of the 'Is Ordered' attribute. |
boolean |
isUnique()
Returns the value of the 'Is Unique' attribute. |
int |
lower()
A query based on the following OCL expression:
lowerBound()
|
int |
lowerBound()
A query based on the following OCL expression:
if lowerValue->isEmpty() then 1 else lowerValue.integerValue() endif
|
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 |
setLowerBound(int value)
Sets the lower bound to the specified integer value. |
void |
setLowerValue(ValueSpecification value)
Sets the value of the ' Lower Value ' containment reference |
void |
setUpperBound(int value)
Sets the upper bound to the specified unlimited natural value. |
void |
setUpperValue(ValueSpecification value)
Sets the value of the ' Upper Value ' containment reference |
int |
upper()
A query based on the following OCL expression:
upperBound()
|
int |
upperBound()
A query based on the following OCL expression:
if upperValue->isEmpty() then 1 else upperValue.unlimitedValue() endif
|
boolean |
validateLowerEqLowerbound(DiagnosticChain diagnostics,
Map context)
An invariant constraint based on the following OCL expression:
lower=lowerBound()
|
boolean |
validateLowerGe0(DiagnosticChain diagnostics,
Map context)
An invariant constraint based on the following OCL expression:
lowerBound()->notEmpty() implies lowerBound() >= 0
|
boolean |
validateUpperEqUpperbound(DiagnosticChain diagnostics,
Map context)
An invariant constraint based on the following OCL expression:
upper = upperBound()
|
boolean |
validateUpperGeLower(DiagnosticChain diagnostics,
Map context)
An invariant constraint based on the following OCL expression:
(upperBound()->notEmpty() and lowerBound()->notEmpty()) implies upperBound() >= lowerBound()
|
boolean |
validateUpperGt0(DiagnosticChain diagnostics,
Map context)
An invariant constraint based on the following OCL expression:
upperBound()->notEmpty() implies upperBound() > 0
|
Methods inherited from interface org.eclipse.uml2.Element |
addKeyword, allOwnedElements, apply, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedVersion, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwner, getValue, hasKeyword, isApplied, isRequired, mustBeOwned, removeKeyword, setValue, unapply, validateHasOwner, validateNotOwnSelf |
Methods inherited from interface org.eclipse.emf.ecore.EModelElement |
getEAnnotation, getEAnnotations |
Methods inherited from interface org.eclipse.emf.ecore.EObject |
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset |
Methods inherited from interface org.eclipse.emf.common.notify.Notifier |
eAdapters, eDeliver, eNotify, eSetDeliver |
Field Detail |
public static final String copyright
public static final int UNLIMITED_UPPER_BOUND
Method Detail |
public boolean isOrdered()
"false"
.
If the meaning of the 'Is Ordered' attribute isn't clear, there really should be more of a description here...
For a multivalued multiplicity, this attribute specifies whether the values in an instantiation of this element are sequentially ordered. Default is false.
setIsOrdered(boolean)
,
UML2Package.getMultiplicityElement_IsOrdered()
public void setIsOrdered(boolean value)
Is Ordered
' attribute.
value
- the new value of the 'Is Ordered' attribute.isOrdered()
public boolean isUnique()
"true"
.
If the meaning of the 'Is Unique' attribute isn't clear, there really should be more of a description here...
For a multivalued multiplicity, this attributes specifies whether the values in an instantiation of this element are unique. Default is true.
setIsUnique(boolean)
,
UML2Package.getMultiplicityElement_IsUnique()
public void setIsUnique(boolean value)
Is Unique
' attribute.
value
- the new value of the 'Is Unique' attribute.isUnique()
public int getLower()
"1"
.
If the meaning of the 'Lower' attribute isn't clear, there really should be more of a description here...
Specifies the lower bound of the multiplicity interval, if it is expressed as an integer.
UML2Package.getMultiplicityElement_Lower()
public int getUpper()
"1"
.
If the meaning of the 'Upper' attribute isn't clear, there really should be more of a description here...
Specifies the upper bound of the multiplicity interval, if it is expressed as an unlimited natural.
UML2Package.getMultiplicityElement_Upper()
public ValueSpecification getUpperValue()
If the meaning of the 'Upper Value' containment reference isn't clear, there really should be more of a description here...
The specification of the upper bound for this multiplicity. Subsets Element::ownedElement.
setUpperValue(ValueSpecification)
,
UML2Package.getMultiplicityElement_UpperValue()
public void setUpperValue(ValueSpecification value)
Upper Value
' containment reference.
value
- the new value of the 'Upper Value' containment reference.getUpperValue()
public ValueSpecification createUpperValue(EClass eClass)
ValueSpecification
and sets the 'Upper Value' containment reference.
eClass
- The Ecore class of the ValueSpecification
to create.
ValueSpecification
.getUpperValue()
public ValueSpecification getLowerValue()
If the meaning of the 'Lower Value' containment reference isn't clear, there really should be more of a description here...
The specification of the lower bound for this multiplicity. Subsets Element::ownedElement.
setLowerValue(ValueSpecification)
,
UML2Package.getMultiplicityElement_LowerValue()
public void setLowerValue(ValueSpecification value)
Lower Value
' containment reference.
value
- the new value of the 'Lower Value' containment reference.getLowerValue()
public ValueSpecification createLowerValue(EClass eClass)
ValueSpecification
and sets the 'Lower Value' containment reference.
eClass
- The Ecore class of the ValueSpecification
to create.
ValueSpecification
.getLowerValue()
public int lowerBound()
if lowerValue->isEmpty() then 1 else lowerValue.integerValue() endif
public int upperBound()
if upperValue->isEmpty() then 1 else upperValue.unlimitedValue() endif
public boolean isMultivalued()
upperBound() > 1
public boolean includesCardinality(int C)
(lowerBound() <= C) and (upperBound() >= C)
public boolean includesMultiplicity(MultiplicityElement M)
(self.lowerBound() <= M.lowerBound()) and (self.upperBound() >= M.upperBound())
public boolean validateUpperGt0(DiagnosticChain diagnostics, Map context)
upperBound()->notEmpty() implies upperBound() > 0
public boolean validateLowerGe0(DiagnosticChain diagnostics, Map context)
lowerBound()->notEmpty() implies lowerBound() >= 0
public boolean validateUpperGeLower(DiagnosticChain diagnostics, Map context)
(upperBound()->notEmpty() and lowerBound()->notEmpty()) implies upperBound() >= lowerBound()
public boolean validateLowerEqLowerbound(DiagnosticChain diagnostics, Map context)
lower=lowerBound()
public boolean validateUpperEqUpperbound(DiagnosticChain diagnostics, Map context)
upper = upperBound()
public int lower()
lowerBound()
public int upper()
upperBound()
public EList getOwnedElements()
getOwnedElements
in interface Element
UML2Package.getElement_OwnedElement()
,
Element.getOwner()
public void setLowerBound(int value)
value
- The new value of the lower bound.
IllegalArgumentException
- If the new lower bound is invalid.lowerBound()
public void setUpperBound(int value)
value
- The new value of the upper bound.
IllegalArgumentException
- If the new upper bound is invalid.upperBound()
|
Copyright 2003, 2004 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |