if (!(parent instanceof CompositeEntity)) {
return 0;
}
CompositeEntity entity = (CompositeEntity) parent;
return entity.numberOfEntities();
}
/** Return the index of the given child within the given parent.
* If the parent is not contained in the child or is not an instance
* of CompositeEntity return -1.