org.camunda.bpm.model.xml.impl.type.child
Class ChildElementImpl<T extends ModelElementInstance>

java.lang.Object
  extended by org.camunda.bpm.model.xml.impl.type.child.ChildElementCollectionImpl<T>
      extended by 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
ChildElementImpl(Class<T> childElementTypeChild, ModelElementTypeImpl parentElementType)
           
 
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 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(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 interface ChildElement<T extends ModelElementInstance>
Parameters:
element - the parent element of the child element
newChildElement - 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 interface ChildElement<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 interface ChildElement<T extends ModelElementInstance>
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.