|
|||||||||||
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 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:
UMLPackage.getMultiplicityElement()
Method Summary | |
boolean |
compatibleWith(MultiplicityElement other)
The operation compatibleWith takes another multiplicity as input. |
ValueSpecification |
createLowerValue(String name,
Type type,
EClass eClass)
Creates a new ValueSpecification , with the specified 'Name', and 'Type', and sets the 'Lower Value' containment reference |
ValueSpecification |
createUpperValue(String name,
Type type,
EClass eClass)
Creates a new ValueSpecification , with the specified 'Name', and 'Type', 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 |
int |
getUpper()
Returns the value of the 'Upper' attribute. |
ValueSpecification |
getUpperValue()
Returns the value of the 'Upper Value' containment reference |
boolean |
includesCardinality(int 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 |
is(int lowerbound,
int upperbound)
The operation is determines if the upper and lower bound of the ranges are the ones given. |
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. |
int |
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(int value)
Sets the value of the ' Lower ' attribute |
void |
setLowerValue(ValueSpecification value)
Sets the value of the ' Lower Value ' containment reference |
void |
setUpper(int value)
Sets the value of the ' Upper ' attribute |
void |
setUpperValue(ValueSpecification value)
Sets the value of the ' Upper Value ' containment reference |
int |
upperBound()
The query upperBound() returns the upper bound of the multiplicity for a bounded multiplicity as an unlimited natural. |
boolean |
validateLowerGe0(DiagnosticChain diagnostics,
Map context)
The lower bound must be a non-negative integer literal. |
boolean |
validateUpperGeLower(DiagnosticChain diagnostics,
Map context)
The upper bound must be greater than or equal to the lower bound. |
boolean |
validateUpperGt0(DiagnosticChain diagnostics,
Map context)
A multiplicity must define at least one valid cardinality that is greater than zero. |
boolean |
validateValueSpecificationConstant(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. |
boolean |
validateValueSpecificationNoSideEffects(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. |
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 |
Method Detail |
public boolean isOrdered()
"false"
.
For a multivalued multiplicity, this attribute specifies whether the values in an instantiation of this element are sequentially ordered.
MultiplicityElement.setIsOrdered(boolean)
,
UMLPackage.getMultiplicityElement_IsOrdered()
public void setIsOrdered(boolean value)
Is Ordered
' attribute.
value
- the new value of the 'Is Ordered' attribute.MultiplicityElement.isOrdered()
public boolean isUnique()
"true"
.
For a multivalued multiplicity, this attributes specifies whether the values in an instantiation of this element are unique.
MultiplicityElement.setIsUnique(boolean)
,
UMLPackage.getMultiplicityElement_IsUnique()
public void setIsUnique(boolean value)
Is Unique
' attribute.
value
- the new value of the 'Is Unique' attribute.MultiplicityElement.isUnique()
public int getUpper()
"1"
.
Specifies the upper bound of the multiplicity interval.
MultiplicityElement.setUpper(int)
,
UMLPackage.getMultiplicityElement_Upper()
public void setUpper(int value)
Upper
' attribute.
value
- the new value of the 'Upper' attribute.MultiplicityElement.getUpper()
public int getLower()
"1"
.
Specifies the lower bound of the multiplicity interval.
MultiplicityElement.setLower(int)
,
UMLPackage.getMultiplicityElement_Lower()
public void setLower(int value)
Lower
' attribute.
value
- the new value of the 'Lower' attribute.MultiplicityElement.getLower()
public ValueSpecification getUpperValue()
MultiplicityElement.setUpperValue(ValueSpecification)
,
UMLPackage.getMultiplicityElement_UpperValue()
public void setUpperValue(ValueSpecification value)
Upper Value
' containment reference.
value
- the new value of the 'Upper Value' containment reference.MultiplicityElement.getUpperValue()
public ValueSpecification createUpperValue(String name, Type type, EClass eClass)
ValueSpecification
, with the specified 'Name', and 'Type', and sets the 'Upper Value' containment reference.
name
- The 'Name' for the new ValueSpecification
, or null
.type
- The 'Type' for the new ValueSpecification
, or null
.eClass
- The Ecore class of the ValueSpecification
to create.
ValueSpecification
.MultiplicityElement.getUpperValue()
public ValueSpecification getLowerValue()
MultiplicityElement.setLowerValue(ValueSpecification)
,
UMLPackage.getMultiplicityElement_LowerValue()
public void setLowerValue(ValueSpecification value)
Lower Value
' containment reference.
value
- the new value of the 'Lower Value' containment reference.MultiplicityElement.getLowerValue()
public ValueSpecification createLowerValue(String name, Type type, EClass eClass)
ValueSpecification
, with the specified 'Name', and 'Type', and sets the 'Lower Value' containment reference.
name
- The 'Name' for the new ValueSpecification
, or null
.type
- The 'Type' for the new ValueSpecification
, or null
.eClass
- The Ecore class of the ValueSpecification
to create.
ValueSpecification
.MultiplicityElement.getLowerValue()
public boolean validateUpperGt0(DiagnosticChain diagnostics, Map context)
public boolean validateLowerGe0(DiagnosticChain diagnostics, Map context)
public boolean validateUpperGeLower(DiagnosticChain diagnostics, Map context)
public boolean validateValueSpecificationNoSideEffects(DiagnosticChain diagnostics, Map context)
public boolean validateValueSpecificationConstant(DiagnosticChain diagnostics, Map context)
public boolean isMultivalued()
public boolean includesCardinality(int C)
public boolean includesMultiplicity(MultiplicityElement M)
public int lowerBound()
public int upperBound()
public boolean compatibleWith(MultiplicityElement other)
public boolean is(int lowerbound, int upperbound)
|
Copyright 2003, 2006 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |