|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ashridgetech.jamda.uml.NSUtil
Utility methods used with the NSUML classes.
Method Summary | |
static java.lang.String |
getId(ru.novosoft.uml.foundation.core.MModelElement me)
Get the XMI id of an NSUML element |
static int |
getLowerMultiplicity(ru.novosoft.uml.foundation.data_types.MMultiplicity multiplicity)
Get the lower bound of any range of a multiplicity. |
static int |
getUpperMultiplicity(ru.novosoft.uml.foundation.data_types.MMultiplicity multiplicity)
Get the upper bound of any range of a multiplicity. |
static boolean |
isMultiple(ru.novosoft.uml.foundation.data_types.MMultiplicity multiplicity)
Show whether a multiplicity can have multiple instances, according to the following rules: if getLowerMultiplicity(ru.novosoft.uml.foundation.data_types.MMultiplicity) and getUpperMultiplicity(ru.novosoft.uml.foundation.data_types.MMultiplicity)
both return StructuredType.UNBOUNDED , assume the multiplicity has not been
specified and defaults to 1, so return false
if getUpperMultiplicity(ru.novosoft.uml.foundation.data_types.MMultiplicity) is greater than 1, return true
if getLowerMultiplicity(ru.novosoft.uml.foundation.data_types.MMultiplicity) is greater than or equal to zero,
and getUpperMultiplicity(ru.novosoft.uml.foundation.data_types.MMultiplicity) is UNBOUNDED, return true
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.String getId(ru.novosoft.uml.foundation.core.MModelElement me)
me
- the element of which the id is required
public static int getLowerMultiplicity(ru.novosoft.uml.foundation.data_types.MMultiplicity multiplicity)
multiplicity
- the MMultiplicity
of which the lower limit is required
StructuredType.UNBOUNDED
.public static int getUpperMultiplicity(ru.novosoft.uml.foundation.data_types.MMultiplicity multiplicity)
multiplicity
- the MMultiplicity
of which the upper limit is required
StructuredType.UNBOUNDED
if there
is no upper limit.public static boolean isMultiple(ru.novosoft.uml.foundation.data_types.MMultiplicity multiplicity)
getLowerMultiplicity(ru.novosoft.uml.foundation.data_types.MMultiplicity)
and getUpperMultiplicity(ru.novosoft.uml.foundation.data_types.MMultiplicity)
both return StructuredType.UNBOUNDED
, assume the multiplicity has not been
specified and defaults to 1, so return falsegetUpperMultiplicity(ru.novosoft.uml.foundation.data_types.MMultiplicity)
is greater than 1, return true
getLowerMultiplicity(ru.novosoft.uml.foundation.data_types.MMultiplicity)
is greater than or equal to zero,
and getUpperMultiplicity(ru.novosoft.uml.foundation.data_types.MMultiplicity)
is UNBOUNDED, return true
multiplicity
- the MMultiplicity
which may be multiple or not
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |