Interface CollectionClass
- All Superinterfaces:
DataClass
,PropertyHandler
- All Known Implementing Classes:
CollectionClassImpl
,ListClassImpl
,SetClassImpl
The Collection Classes
SetClass
and
ListClass
are both containers that can store
each kind of data objects. Typical restrictions are the maximum and minimum number of elements
and the base data class of whom the element objects must be instances. The difference between
List and Set is that a List stores the elements in a fixed order, whereby a Set uses an arbitrary
order.
Properties of collection classes:
Data Class | Equal Element Types? | Elements Ordered? | Duplicates Possible? | Element Access | Number of Elements |
---|---|---|---|---|---|
SetClass |
yes | no | no | iterator | variable |
ListClass |
yes | yes | yes | iterator | variable |
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The name of the class.static final String
static final String
Fields inherited from interface de.uni_trier.wi2.procake.data.model.DataClass
LOG_ABSTRACT_CLASS_NOT_INSTANTIABLE, LOG_ABSTRACT_SYSTEM_SUBCLASS_CREATION_FAILED, LOG_CLASS_NOT_EDITABLE, LOG_CLASS_NOT_INSTANTIABLE, LOG_EDITABLE_CLASS_NOT_INSTANTIABLE, LOG_FINISH_EDIT_FAILED, LOG_GET_SUPERCLASSES_FAILED, LOG_SUBCLASS_CREATION_FAILED
-
Method Summary
Modifier and TypeMethodDescriptionEach collection can contain elements of one special type.int
getMaxCardinality.int
getMinCardinality.void
setElementClass
(DataClass elementClass) Each collection can contain elements of one special type.void
setMaxCardinality
(int maxCardinality) setMaxCardinality.void
setMinCardinality
(int minCardinality) setMinCardinality.Methods inherited from interface de.uni_trier.wi2.procake.data.model.DataClass
addSubclass, checkInstantiability, createSubclass, finishEditing, getModel, getName, getObjectClass, getSubClasses, getSuperClass, getSuperClasses, getSystemClassName, getSystemSuperClass, includeClass, isAbstract, isAggregate, isAtomic, isBoolean, isByteArray, isCake2DataReference, isChronologic, isCollection, isControlflowItem, isDataflowWrapper, isDate, isDouble, isEditable, isInstantiable, isInteger, isInterval, isList, isNESTConstraintEdge, isNESTControlflowEdge, isNESTControlflowNode, isNESTDataflowEdge, isNESTDataNode, isNESTEdge, isNESTGraph, isNESTGraphItem, isNESTNode, isNESTPartOfEdge, isNESTSequenceNode, isNESTSequentialWorkflow, isNESTSubWorkflowNode, isNESTTaskNode, isNESTWorkflow, isNESTWorkflowNode, isNode, isNumeric, isParentItem, isSequence, isSet, isString, isSubclassOf, isSubWorkflow, isSystemClass, isTask, isTime, isTimestamp, isUnion, isURI, isVoid, isWorkflow, isWorkflowItem, newObject, removeSubclass, setAbstract, setName
Methods inherited from interface de.uni_trier.wi2.procake.data.PropertyHandler
addProperty, addProperty, getAllProperties, getAllPropertyNodes, getProperty, getPropertyNames, getPropertyNode, getPropertyRootNode, hasProperties, removeProperty, setPropertyRootNode
-
Field Details
-
CLASS_NAME
The name of the class. This name should be used inModel.getClass(String)
to receive the system class. The value is * "Collection" .- See Also:
-
LOG_INCONSISTENT_ELEMENTCLASS
- See Also:
-
LOG_MISSING_ELEMENTCLASS
- See Also:
-
-
Method Details
-
getElementClass
DataClass getElementClass()Each collection can contain elements of one special type. This type can be received with this method.If several
DataClass
es should be used as type, you must summarize these classes in anUnionClass
.- Returns:
- The
DataClass
of the elements.
-
setElementClass
Each collection can contain elements of one special type. This type can be received with this method.If several
DataClass
es should be used as type, you must summarize these classes in anUnionClass
.- Parameters:
elementClass
- TheDataClass
of the collection elements.- Throws:
IllegalEditException
- if any.
-
getMaxCardinality
int getMaxCardinality()getMaxCardinality.
- Returns:
- the maximum number of elements that are allowed in the
CollectionObject
-
setMaxCardinality
setMaxCardinality.
- Parameters:
maxCardinality
- The maximum number of elements that are allowed in theCollectionObject
.- Throws:
IllegalEditException
- is thrown if the class is not editable, e.g., the class is already declared as finished.
-
getMinCardinality
int getMinCardinality()getMinCardinality.
- Returns:
- the minimum number of elements that are required in the
CollectionObject
-
setMinCardinality
setMinCardinality.
- Parameters:
minCardinality
- The minimum number of elements that are required in theCollectionObject
.- Throws:
IllegalEditException
- is thrown if the class is not editable, e.g., the class is already declared as finished.
-