Class ChildElementCollectionImpl<T extends ModelElementInstance>
java.lang.Object
org.camunda.bpm.model.xml.impl.type.child.ChildElementCollectionImpl<T>
- All Implemented Interfaces:
ChildElementCollection<T>
- Direct Known Subclasses:
ChildElementImpl
public class ChildElementCollectionImpl<T extends ModelElementInstance>
extends Object
implements ChildElementCollection<T>
This collection is a view on an the children of a Model Element.
- Author:
- Daniel Meyer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intthe maximum count of child elements in the collection. -
Constructor Summary
ConstructorsConstructorDescriptionChildElementCollectionImpl(Class<T> childElementTypeClass, ModelElementTypeImpl parentElementType) -
Method Summary
Modifier and TypeMethodDescriptionget(ModelElementInstance element) returns aCollectioncontaining 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.intIndicates the max element count of a collection.intIndicates the minimal element count of a collection.Get the model element type of the element owns the collectionbooleanIndicates whether the collection is immutable.voidvoidsetMaxOccurs(int maxOccurs) voidsetMinOccurs(int minOccurs) voidsetMutable(boolean isMutable)
-
Field Details
-
childElementTypeClass
-
maxOccurs
protected int maxOccursthe maximum count of child elements in the collection. An unbounded collection has a negative maxOccurs.
-
-
Constructor Details
-
ChildElementCollectionImpl
public ChildElementCollectionImpl(Class<T> childElementTypeClass, ModelElementTypeImpl parentElementType)
-
-
Method Details
-
setImmutable
public void setImmutable() -
setMutable
public void setMutable(boolean isMutable) -
isImmutable
public boolean isImmutable()Description copied from interface:ChildElementCollectionIndicates whether the collection is immutable. If the collection is immutable, all state-altering operations such asCollection.add(Object)orCollection.remove(Object)will throw anUnsupportedOperationException.- Specified by:
isImmutablein interfaceChildElementCollection<T extends ModelElementInstance>- Returns:
- true if the collection is mutable, false otherwise.
-
getMinOccurs
public int getMinOccurs()Description copied from interface:ChildElementCollectionIndicates the minimal element count of a collection. Returns a positive integer or '0'.- Specified by:
getMinOccursin interfaceChildElementCollection<T extends ModelElementInstance>- Returns:
- the minimal element count of the collection.
-
setMinOccurs
public void setMinOccurs(int minOccurs) -
getMaxOccurs
public int getMaxOccurs()Description copied from interface:ChildElementCollectionIndicates the max element count of a collection. In a negative value is returned (like '-1'), the collection is unbounded.- Specified by:
getMaxOccursin interfaceChildElementCollection<T extends ModelElementInstance>- Returns:
- the max element count for this collection.
-
getChildElementType
Description copied from interface:ChildElementCollectionGet the model element type of the elements contained in this collection.- Specified by:
getChildElementTypein interfaceChildElementCollection<T extends ModelElementInstance>- Parameters:
model- the model of the element- Returns:
- the containing
ModelElementType
-
getChildElementTypeClass
Description copied from interface:ChildElementCollectionGet the class of the elements contained in this collection.- Specified by:
getChildElementTypeClassin interfaceChildElementCollection<T extends ModelElementInstance>- Returns:
- the class of contained types
-
getParentElementType
Description copied from interface:ChildElementCollectionGet the model element type of the element owns the collection- Specified by:
getParentElementTypein interfaceChildElementCollection<T extends ModelElementInstance>- Returns:
- the parent element of the collection
-
setMaxOccurs
public void setMaxOccurs(int maxOccurs) -
get
Description copied from interface:ChildElementCollectionreturns aCollectioncontaining all or a subset of the child elements of aModelElementInstance.- Specified by:
getin interfaceChildElementCollection<T extends ModelElementInstance>
-