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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<T>get(ModelElementInstance element)returns aCollectioncontaining all or a subset of the child elements of aModelElementInstance.ModelElementTypegetChildElementType(Model model)Get the model element type of the elements contained in this collection.Class<T>getChildElementTypeClass()Get the class of the elements contained in this collection.intgetMaxOccurs()Indicates the max element count of a collection.intgetMinOccurs()Indicates the minimal element count of a collection.ModelElementTypegetParentElementType()Get the model element type of the element owns the collectionbooleanisImmutable()Indicates whether the collection is immutable.
-
-
-
Method Detail
-
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
ModelElementType getChildElementType(Model model)
Get the model element type of the elements contained in this collection.- Parameters:
model- the model of the element- Returns:
- the containing
ModelElementType
-
getChildElementTypeClass
Class<T> 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
Collection<T> get(ModelElementInstance element)
returns aCollectioncontaining all or a subset of the child elements of aModelElementInstance.
-
-