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
Modifier and TypeFieldDescriptionprotected int
the maximum count of child elements in the collection. -
Constructor Summary
ConstructorDescriptionChildElementCollectionImpl
(Class<T> childElementTypeClass, ModelElementTypeImpl parentElementType) -
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.void
void
setMaxOccurs
(int maxOccurs) void
setMinOccurs
(int minOccurs) void
setMutable
(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:ChildElementCollection
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
.- Specified by:
isImmutable
in interfaceChildElementCollection<T extends ModelElementInstance>
- Returns:
- true if the collection is mutable, false otherwise.
-
getMinOccurs
public int getMinOccurs()Description copied from interface:ChildElementCollection
Indicates the minimal element count of a collection. Returns a positive integer or '0'.- Specified by:
getMinOccurs
in 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:ChildElementCollection
Indicates the max element count of a collection. In a negative value is returned (like '-1'), the collection is unbounded.- Specified by:
getMaxOccurs
in interfaceChildElementCollection<T extends ModelElementInstance>
- Returns:
- the max element count for this collection.
-
getChildElementType
Description copied from interface:ChildElementCollection
Get the model element type of the elements contained in this collection.- Specified by:
getChildElementType
in interfaceChildElementCollection<T extends ModelElementInstance>
- Parameters:
model
- the model of the element- Returns:
- the containing
ModelElementType
-
getChildElementTypeClass
Description copied from interface:ChildElementCollection
Get the class of the elements contained in this collection.- Specified by:
getChildElementTypeClass
in interfaceChildElementCollection<T extends ModelElementInstance>
- Returns:
- the class of contained types
-
getParentElementType
Description copied from interface:ChildElementCollection
Get the model element type of the element owns the collection- Specified by:
getParentElementType
in interfaceChildElementCollection<T extends ModelElementInstance>
- Returns:
- the parent element of the collection
-
setMaxOccurs
public void setMaxOccurs(int maxOccurs) -
get
Description copied from interface:ChildElementCollection
returns aCollection
containing all or a subset of the child elements of aModelElementInstance
.- Specified by:
get
in interfaceChildElementCollection<T extends ModelElementInstance>
-