|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CwmEnumerationLiteral
EnumerationLiteral object instance interface. EnumerationLiteral instances describe the enumeration identifiers, and possibly the values, associated with an enumerated data type. Enumeration identifiers are contained in the name attribute derived from the EnumerationLiteral instance?s ModelElement superclass. EnumerationLiteral instances may also be used to define expression-based values such as ranges. To do so, simply state the membership expression in the instance?s value. For example, a range literal can be created by setting the value attribute to "m..n", where m represents the lower bound of the range, and n, the upper bound. In this way, ranges and other more complicated expressions can be intermixed with simple enumeration literals. For example, an enumeration might contain the literals "1", "2", "4..7", and "> 10". Consequently, a simple range data type can be created with an Enumeration instance that owns a single EnumerationLiteral instance. For example, a data type for positive integers could be created as shown in the following instance diagram. A model attribute of this data type might then be declared as "posInt : PositiveInteger".
Note: This type should not be subclassed, implemented or directly instantiated by clients. It is generated from a MOF metamodel and implemented by Enki or MDR.
Method Summary | |
---|---|
CwmEnumeration |
getEnumeration()
Returns the value of reference enumeration. |
CwmExpression |
getValue()
Returns the value of attribute value. |
void |
setEnumeration(CwmEnumeration newValue)
Sets the value of enumeration reference. |
void |
setValue(CwmExpression newValue)
Sets the value of value attribute. |
Methods inherited from interface net.sf.farrago.cwm.core.CwmModelElement |
---|
getClientDependency, getConstraint, getImporter, getName, getNamespace, getVisibility, setName, setNamespace, setVisibility |
Methods inherited from interface javax.jmi.reflect.RefObject |
---|
refClass, refDelete, refImmediateComposite, refIsInstanceOf, refOutermostComposite |
Methods inherited from interface javax.jmi.reflect.RefFeatured |
---|
refGetValue, refGetValue, refInvokeOperation, refInvokeOperation, refSetValue, refSetValue |
Methods inherited from interface javax.jmi.reflect.RefBaseObject |
---|
equals, hashCode, refImmediatePackage, refMetaObject, refMofId, refOutermostPackage, refVerifyConstraints |
Method Detail |
---|
CwmExpression getValue()
void setValue(CwmExpression newValue)
getValue()
for
description on the attribute.
newValue
- New value to be set.CwmEnumeration getEnumeration()
void setEnumeration(CwmEnumeration newValue)
getEnumeration()
for description on the attribute.
newValue
- New value to be set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |