org.camunda.bpm.model.xml.type.child
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 where ChildElementCollection.getMaxOccurs() returns 1. The Collection.add(Object) operation provided by this collection has special behavior: it will replace an existing element if it exists.

Author:
Daniel Meyer

Method Summary
 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 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 element
newChildElement - 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


Copyright © 2014 camunda services GmbH. All rights reserved.