Class ChildElementImpl<T extends ModelElementInstance>
- java.lang.Object
-
- org.camunda.bpm.model.xml.impl.type.child.ChildElementCollectionImpl<T>
-
- org.camunda.bpm.model.xml.impl.type.child.ChildElementImpl<T>
-
- All Implemented Interfaces:
ChildElement<T>
,ChildElementCollection<T>
public class ChildElementImpl<T extends ModelElementInstance> extends ChildElementCollectionImpl<T> implements ChildElement<T>
Represents a single Child Element (ie. maxOccurs = 1);- Author:
- Daniel Meyer
-
-
Field Summary
-
Fields inherited from class org.camunda.bpm.model.xml.impl.type.child.ChildElementCollectionImpl
childElementTypeClass, maxOccurs
-
-
Constructor Summary
Constructors Constructor Description ChildElementImpl(java.lang.Class<T> childElementTypeChild, ModelElementTypeImpl parentElementType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getChild(ModelElementInstance element)
Returns the child element.boolean
removeChild(ModelElementInstance element)
Removes the child element.void
setChild(ModelElementInstance element, T newChildElement)
Sets the child element, potentially replacing an existing child element.-
Methods inherited from class org.camunda.bpm.model.xml.impl.type.child.ChildElementCollectionImpl
get, getChildElementType, getChildElementTypeClass, getMaxOccurs, getMinOccurs, getParentElementType, isImmutable, setImmutable, setMaxOccurs, setMinOccurs, setMutable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.camunda.bpm.model.xml.type.child.ChildElementCollection
get, getChildElementType, getChildElementTypeClass, getMaxOccurs, getMinOccurs, getParentElementType, isImmutable
-
-
-
-
Constructor Detail
-
ChildElementImpl
public ChildElementImpl(java.lang.Class<T> childElementTypeChild, ModelElementTypeImpl parentElementType)
-
-
Method Detail
-
setChild
public void setChild(ModelElementInstance element, T newChildElement)
Description copied from interface:ChildElement
Sets the child element, potentially replacing an existing child element.- Specified by:
setChild
in interfaceChildElement<T extends ModelElementInstance>
- Parameters:
element
- the parent element of the child elementnewChildElement
- the new child element to set
-
getChild
public T getChild(ModelElementInstance element)
Description copied from interface:ChildElement
Returns the child element.- Specified by:
getChild
in interfaceChildElement<T extends ModelElementInstance>
- Parameters:
element
- the parent element of the child element- Returns:
- the child element of the parent, or null if not exist
-
removeChild
public boolean removeChild(ModelElementInstance element)
Description copied from interface:ChildElement
Removes the child element.- Specified by:
removeChild
in interfaceChildElement<T extends ModelElementInstance>
- Parameters:
element
- the parent element of the child element- Returns:
- true if the child was remove otherwise false
-
-