Interface ChildElementCollection<T extends ModelElementInstance>
- Type Parameters:
T
- The type of the model elements in the collection
- All Known Subinterfaces:
ChildElement<T>
- All Known Implementing Classes:
ChildElementCollectionImpl
,ChildElementImpl
public interface ChildElementCollection<T extends ModelElementInstance>
A collection containing all or a subset of the child
elements of a given ModelElementInstance
.
- Author:
- Daniel Meyer
-
Method Summary
Modifier and TypeMethodDescriptionget
(ModelElementInstance element) returns aCollection
containing all or a subset of the child elements of aModelElementInstance
.getChildElementType
(Model model) Get the model element type of the elements contained in this collection.Get the class of the elements contained in this collection.int
Indicates the max element count of a collection.int
Indicates the minimal element count of a collection.Get the model element type of the element owns the collectionboolean
Indicates whether the collection is immutable.
-
Method Details
-
isImmutable
boolean isImmutable()Indicates whether the collection is immutable. If the collection is immutable, all state-altering operations such asCollection.add(Object)
orCollection.remove(Object)
will throw anUnsupportedOperationException
.- Returns:
- true if the collection is mutable, false otherwise.
-
getMinOccurs
int getMinOccurs()Indicates the minimal element count of a collection. Returns a positive integer or '0'.- Returns:
- the minimal element count of the collection.
-
getMaxOccurs
int getMaxOccurs()Indicates the max element count of a collection. In a negative value is returned (like '-1'), the collection is unbounded.- Returns:
- the max element count for this collection.
-
getChildElementType
Get the model element type of the elements contained in this collection.- Parameters:
model
- the model of the element- Returns:
- the containing
ModelElementType
-
getChildElementTypeClass
Get the class of the elements contained in this collection.- Returns:
- the class of contained types
-
getParentElementType
ModelElementType getParentElementType()Get the model element type of the element owns the collection- Returns:
- the parent element of the collection
-
get
returns aCollection
containing all or a subset of the child elements of aModelElementInstance
.
-