Interface ChildElement<T extends ModelElementInstance>
-
- Type Parameters:
T- the type of the child element
- All Superinterfaces:
ChildElementCollection<T>
- All Known Implementing Classes:
ChildElementImpl
public interface ChildElement<T extends ModelElementInstance> extends ChildElementCollection<T>
A single child element (child Element collection whereChildElementCollection.getMaxOccurs()returns 1. TheCollection.add(Object)operation provided by this collection has special behavior: it will replace an existing element if it exists.- Author:
- Daniel Meyer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TgetChild(ModelElementInstance element)Returns the child element.booleanremoveChild(ModelElementInstance element)Removes the child element.voidsetChild(ModelElementInstance element, T newChildElement)Sets the child element, potentially replacing an existing child element.-
Methods inherited from interface org.camunda.bpm.model.xml.type.child.ChildElementCollection
get, getChildElementType, getChildElementTypeClass, getMaxOccurs, getMinOccurs, getParentElementType, isImmutable
-
-
-
-
Method Detail
-
setChild
void setChild(ModelElementInstance element, T newChildElement)
Sets the child element, potentially replacing an existing child element.- Parameters:
element- the parent element of the child elementnewChildElement- the new child element to set
-
getChild
T getChild(ModelElementInstance element)
Returns the child element.- Parameters:
element- the parent element of the child element- Returns:
- the child element of the parent, or null if not exist
-
removeChild
boolean removeChild(ModelElementInstance element)
Removes the child element.- Parameters:
element- the parent element of the child element- Returns:
- true if the child was remove otherwise false
-
-