C - the type of children contained in this parentpublic interface Parent<C>
Parent interface defines the contract for an object that may
 contain one or more child objects.| Modifier and Type | Method and Description | 
|---|---|
boolean | 
addChild(C child)
Add the given child to this parent object. 
 | 
int | 
childCount()
Get the number of children for this parent object. 
 | 
boolean | 
containsChild(C child)
Returns  
true if the given child object has been added to this
 parent. | 
java.util.Collection<C> | 
getChildren()
Get the children for this parent object. 
 | 
boolean | 
hasChildren()
Returns  
true if this parent has at least one (1) child. | 
boolean | 
removeChild(C child)
Remove the given child from this parent. 
 | 
java.util.Collection<C> getChildren()
boolean addChild(C child)
 Implementors should document whether their implementation will 
 automatically set the parent value of the child if 
 the given child implements the Child interface.
child - the child to be added to this parenttrue if the given child was added to this parent, 
 false otherwiseboolean hasChildren()
true if this parent has at least one (1) child.true if this parent has at least one (1) child, 
 false otherwiseboolean containsChild(C child)
true if the given child object has been added to this
 parent.child - the child objecttrue if the given child object has been added to this
 parent, false otherwiseboolean removeChild(C child)
 Implementors should document whether their implementation will 
 automatically clear the parent value of the child 
 if the given child implements the Child interface.
child - the child to be removedtrue if the child was removed from this parent,
 false otherwiseint childCount()